Hide Sub-form until data is in main form

D

Dave Elliott

I want to hide the sub-form until there is data in a control on the main
form.
Main form is TimeCards and sub-form is Time and Hours
Control on main form is NameB
 
A

ACG

This assumes that you have to perform some sort of action
to select a record in the main form.

Inirtally set the properties on the subform control to
visible = No and then in the event that is run when a
record is selected use:
Me![NameB].Form.Visible = True
 
D

Dave Elliott

Ok, I set the sub-from properties to Visible = False
I put this code on the current event of the main form.
The sub-from does not show wehn there is data in the control NameB ?????


If Not IsNull([NameB]) Then
Time_Hours.Form.Visible = True



ACG said:
This assumes that you have to perform some sort of action
to select a record in the main form.

Inirtally set the properties on the subform control to
visible = No and then in the event that is run when a
record is selected use:
Me![NameB].Form.Visible = True



-----Original Message-----
I want to hide the sub-form until there is data in a control on the main
form.
Main form is TimeCards and sub-form is Time and Hours
Control on main form is NameB



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top