If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Tab control "bleed through"
In Access 2007, I had a form that had two sections of controls.
Today, I added a third section and thought "oh hell, this is getting unwieldy. I'll just make this a tabbed control". So, I put a tabbed control on my form. I then dragged the first section of controls onto the first page of the tabbed control. Worked beautifully. Then I dragged the second section of controls onto the second page. Perfect, all works fine so far. As should be familiar to everyone here, a tab control starts out with just two pages, so I then right clicked the control to add a third page. Then I dragged the third set of controls onto the new page, just as I did the first two sets. This third set of controls appears on all the pages! How can I make it such that, like the first two sets, these controls appear on that page and only that page? What am I missing? As an addendum, I just tried to repeat what I just described (by closing out of the form without saving). Now all the pages of the introduced tab control will not accept the dragged controls. for some reason, dragging a control onto a tabbed control's page is something that works only sporadically, and I can't figure out how to return to the circumstance where it works. I would simply cut and paste my controls onto the pages, but that requires rewiring everything. If I separate out the controls on three different forms and use subforms, I have to rewrite all my queries by form (the expressions don't automatically update). Aargggggh. Is it permitted to bash Access on this group, or is that considered trolling??? Thanks, John |
#2
|
|||
|
|||
Tab control "bleed through"
John Harrington wrote:
This third set of controls appears on all the pages! How can I make it such that, like the first two sets, these controls appear on that page and only that page? What am I missing? You're not first person to stumble on this rock. What is going on is that you didn't actually place the controls IN the tab controls, but rather ON tab control. What you need to do is first, select a group of controls you want to be on the 2nd page, then Ctrl-X (cut) to remove the controls, then on the tab control, select the 2nd page - IIRC, you need make sure you have the 2nd page highlighted (e.g. you can see the 2nd page listed on the combobox in the property sheet and not tab control itself or anything.) then paste the controls. It should then be IN the 2nd page. Did that help? |
#3
|
|||
|
|||
Tab control "bleed through"
When a control is showing on all pages of a tab control, select the control
and cut it. Now click the tab for the page you want and paste it. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "John Harrington" wrote in message ... In Access 2007, I had a form that had two sections of controls. Today, I added a third section and thought "oh hell, this is getting unwieldy. I'll just make this a tabbed control". So, I put a tabbed control on my form. I then dragged the first section of controls onto the first page of the tabbed control. Worked beautifully. Then I dragged the second section of controls onto the second page. Perfect, all works fine so far. As should be familiar to everyone here, a tab control starts out with just two pages, so I then right clicked the control to add a third page. Then I dragged the third set of controls onto the new page, just as I did the first two sets. This third set of controls appears on all the pages! How can I make it such that, like the first two sets, these controls appear on that page and only that page? What am I missing? As an addendum, I just tried to repeat what I just described (by closing out of the form without saving). Now all the pages of the introduced tab control will not accept the dragged controls. for some reason, dragging a control onto a tabbed control's page is something that works only sporadically, and I can't figure out how to return to the circumstance where it works. I would simply cut and paste my controls onto the pages, but that requires rewiring everything. If I separate out the controls on three different forms and use subforms, I have to rewrite all my queries by form (the expressions don't automatically update). Aargggggh. Is it permitted to bash Access on this group, or is that considered trolling??? Thanks, John |
#4
|
|||
|
|||
Tab control "bleed through"
On Jan 20, 12:51*pm, Banana Banana@Republic wrote:
John Harrington wrote: This third set of controls appears on all the pages! *How can I make it such that, like the first two sets, these controls appear on that page and only that page? *What am I missing? You're not first person to stumble on this rock. What is going on is that you didn't actually place the controls IN the tab controls, but rather ON tab control. What you need to do is first, select a group of controls you want to be on the 2nd page, then Ctrl-X (cut) to remove the controls, then on the tab control, select the 2nd page - IIRC, you need make sure you have the 2nd page highlighted (e.g. you can see the 2nd page listed on the combobox in the property sheet and not tab control itself or anything.) then paste the controls. It should then be IN the 2nd page. Did that help? Thanks, but once you cut and paste controls in Access, you lose all connection to the events. These can be reestablished, I suppose. But are there any other consequences to cutting and pasting that I should be aware of before I boldly try this? Thanks, John |
#5
|
|||
|
|||
Tab control "bleed through"
On Jan 20, 3:24*pm, John Harrington wrote:
On Jan 20, 12:51*pm, Banana Banana@Republic wrote: John Harrington wrote: This third set of controls appears on all the pages! *How can I make it such that, like the first two sets, these controls appear on that page and only that page? *What am I missing? You're not first person to stumble on this rock. What is going on is that you didn't actually place the controls IN the tab controls, but rather ON tab control. What you need to do is first, select a group of controls you want to be on the 2nd page, then Ctrl-X (cut) to remove the controls, then on the tab control, select the 2nd page - IIRC, you need make sure you have the 2nd page highlighted (e.g. you can see the 2nd page listed on the combobox in the property sheet and not tab control itself or anything.) then paste the controls. It should then be IN the 2nd page. Did that help? Thanks, but once you cut and paste controls in Access, you lose all connection to the events. *These can be reestablished, I suppose. *But are there any other consequences to cutting and pasting that I should be aware of before I boldly try this? Thanks, John Also, does it change the path to the controls? I have a lot of queries by form dependent. John |
#6
|
|||
|
|||
Tab control "bleed through"
When you move controls from the form's Detail Section directly to a page of
the tabbed control, you do, indeed, need to "reconnect" the controls and their event codes. Courtesy of ADezii at Bytes.com, this code will "reconnect" controls to some selected Events (OnClick and AfterUpdate in this example.) It can be modified for other Events, and has the advantage of updating a large number of controls without doing them one by one. Private Sub Form_Load() Dim ctl As Control For Each ctl In Me.Controls If (TypeOf ctl Is TextBox) Or (TypeOf ctl Is ComboBox) Then If ctl.OnClick = "" Then ctl.OnClick = "[Event Procedure]" End If End If Next For Each ctl In Me.Controls If (TypeOf ctl Is TextBox) Or (TypeOf ctl Is ComboBox) Then If ctl.AfterUpdate = "" Then ctl.AfterUpdate = "[Event Procedure]" End If End If Next End Sub Alternatively, in Design View, you can select a control, go into Properties - Events and click on the event in question, to take you to the code window, as if you were setting it up for the first time. Once in the code window, simply return to Design View. The control is now "connected" to its code and the hotkey will work. The disadvantage to this is that it's time consuming if it have moved a lot of controls. As for you other question, referencing a control placed directly on a tabbed page is done in the exact same way as referencing a control on the detail section; the tabbed control doesn't change this. This does not apply to a control on a subform on a tabbed page! Controls on subforms (whether on tabbed pages or not) are another thing entirely. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|