A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Make Subform Invisible using Form



 
 
Thread Tools Display Modes
  #1  
Old April 17th, 2005, 03:59 AM
Jace Campbell
external usenet poster
 
Posts: n/a
Default 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  
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.



  #3  
Old April 19th, 2005, 09:52 PM
Ren
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 03:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.