Hide Sub-form until data is in main form

  • Thread starter Thread starter Dave Elliott
  • Start date Start date
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
 
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
 
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



.
 
Back
Top