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 subforms invisible/visible



 
 
Thread Tools Display Modes
  #1  
Old January 9th, 2008, 10:55 PM posted to microsoft.public.access.forms
cuyeda
external usenet poster
 
Posts: 15
Default Make subforms invisible/visible

Can I code an event procedure to make a subform visible or not visible? For
example, if a user clicks a button on the main form the subform
appears/disappears?

I don't know how to do this aside from manually using the property box for
the subform control.
  #2  
Old January 9th, 2008, 11:16 PM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Make subforms invisible/visible

A SubFormControl has a Visible property. The click event of your commabd
button on the Main form would be: Me.SubFormControl.Visible = Not Me.
SubFormControl.Visible
...to make the SubForm toggle the visibility on and off.


cuyeda wrote:
Can I code an event procedure to make a subform visible or not visible? For
example, if a user clicks a button on the main form the subform
appears/disappears?

I don't know how to do this aside from manually using the property box for
the subform control.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

  #3  
Old January 10th, 2008, 12:06 AM posted to microsoft.public.access.forms
cuyeda
external usenet poster
 
Posts: 15
Default Make subforms invisible/visible

This works - but what if the event procedure occurs within the subform
(rather than in the main form). Then what is the syntax? I tried

Me.Visible=False and
[forms]![main form]![subform control].Visible = False

But neither of these work?

Thanks.

"ruralguy via AccessMonster.com" wrote:

A SubFormControl has a Visible property. The click event of your commabd
button on the Main form would be: Me.SubFormControl.Visible = Not Me.
SubFormControl.Visible
...to make the SubForm toggle the visibility on and off.


cuyeda wrote:
Can I code an event procedure to make a subform visible or not visible? For
example, if a user clicks a button on the main form the subform
appears/disappears?

I don't know how to do this aside from manually using the property box for
the subform control.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com


  #4  
Old January 10th, 2008, 12:38 AM posted to microsoft.public.access.forms
ruralguy via AccessMonster.com
external usenet poster
 
Posts: 1,172
Default Make subforms invisible/visible

That was not your original question but you will have trouble hiding a
control with the focus anyway.

cuyeda wrote:
This works - but what if the event procedure occurs within the subform
(rather than in the main form). Then what is the syntax? I tried

Me.Visible=False and
[forms]![main form]![subform control].Visible = False

But neither of these work?

Thanks.

A SubFormControl has a Visible property. The click event of your commabd
button on the Main form would be: Me.SubFormControl.Visible = Not Me.

[quoted text clipped - 7 lines]
I don't know how to do this aside from manually using the property box for
the subform control.


--
RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via http://www.accessmonster.com

 




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


All times are GMT +1. The time now is 07:52 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.