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 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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|