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
|
|||
|
|||
Make Subform Invisible using Form
I have many subforms on a form and I am using clicks on my main form to set
the visible property for each subform individually. I can click on one button on my form and the subform shows up fine. Click on another button and I make one subform invisible and another one visible. I have no need for a link between the form and subform. This seems to work fine. However, when I make one subform visible and click on the subform and thus change the focus I am then unable to use the button on the form to make the subform invisible again. It is as if the focus changes to the subform and I don't know how to make it where I can make the subform invisible again. I have looked at previous postings but cannot find this specific problem anywhere. Thank you for your help. |
#2
|
|||
|
|||
The focus should shift to whatever you click. Try setting the subform height
to 0 instead of making it visible, then setting it back to it's height with the same button (air code): Sub cmdWhatever_Click(Cancel As Integer) If mySubform = 0" Then mySubform = 2" Else mySubform = 0" End Sub -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads: http://www.datastrat.com http://www.mvps.org/access "Jace Campbell" (pleasespamthis) wrote in message ... I have many subforms on a form and I am using clicks on my main form to set the visible property for each subform individually. I can click on one button on my form and the subform shows up fine. Click on another button and I make one subform invisible and another one visible. I have no need for a link between the form and subform. This seems to work fine. However, when I make one subform visible and click on the subform and thus change the focus I am then unable to use the button on the form to make the subform invisible again. It is as if the focus changes to the subform and I don't know how to make it where I can make the subform invisible again. I have looked at previous postings but cannot find this specific problem anywhere. Thank you for your help. |
#3
|
|||
|
|||
Hi,
I have multiple subforms overlaid and set the visible property based on the cmd button they click on. I just put a cmd button on my main form that resets the subforms visible property of whatever has the focus back to false. One other way you could do it is attach code to the OnClick event that would check the visible property and toggle it each time you click. Hope this helps! Renee "Jace Campbell" wrote: I have many subforms on a form and I am using clicks on my main form to set the visible property for each subform individually. I can click on one button on my form and the subform shows up fine. Click on another button and I make one subform invisible and another one visible. I have no need for a link between the form and subform. This seems to work fine. However, when I make one subform visible and click on the subform and thus change the focus I am then unable to use the button on the form to make the subform invisible again. It is as if the focus changes to the subform and I don't know how to make it where I can make the subform invisible again. I have looked at previous postings but cannot find this specific problem anywhere. Thank you for your help. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Requerying a pop up form to display in the main form | Jennifer P | Using Forms | 13 | April 5th, 2005 06:59 PM |
Design help, please | SillySally | Using Forms | 27 | March 6th, 2005 04:11 AM |
subform's field and corresponding recordset out of sync? | AB | General Discussion | 3 | November 8th, 2004 10:54 PM |
Need help with cascading combos | Tom | Using Forms | 19 | July 1st, 2004 11:11 PM |
Recordset in subform based on field in parent form | Lyn | General Discussion | 15 | June 14th, 2004 03:10 PM |