View Single Post
  #2  
Old April 17th, 2005, 01:48 PM
Arvin Meyer
external usenet poster
 
Posts: n/a
Default

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.