subform from a command button

jlabre01

Registered User.
Local time
Today, 04:46
Joined
May 26, 2008
Messages
62
Hi,
I would like to know if it's possible to open/close a subform in a form using a command button?

jlabre01
 
Do you mean DISPLAY or HIDE a subform in a form using a command button? If so, then the answer is yes. There are many ways to do it.

1. You can leave it there and just set the subform control's visible property to be NO at first and then just have the click event of the button set it visible or not:

Me.YourSubformControlName.Visible = Not Me.YourSubformControlName.Visible

2. Or if you don't want the records loaded first, you can remove the source object of the subform control before saving the form and then assign it at the click of the button:

Me.YourSubformControlName.SourceObject = "YourSubformNameHere"
 
thank you sir, you were a big help, as always
 

Users who are viewing this thread

Back
Top Bottom