Show subform only by clicking on a command button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a subform that is based on a query of 2 tables, and allows the user to
enter data that will update the 2 tables. Is there a way to only show this
form if the user clicks on a button from a main form? Thanks.
 
Try making the subform invisble then try this from the commandbutton

Me.Form.YourSubformNameGoesHere.Visble = True
 
JoJo;

Place a Command Button on the main form.

If the form You want to open is NOT a sub-form:

In the OnClick property event paste and modify this code:
DoCmd.OpenForm "Switchboard"
Change "Switchboard" to the name of Your form.

If it is a hidden sub-form paste and modify this code in the OnClick event.

Forms![MainFormsName]![SfrmsName].Form.Visible = True

Andy
 
Back
Top