Hide the Sub Fm

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

Guest

I have a sub form that I would like to hide until the user fills out all the
required fields in the parent form. At this time that is the Fname, Lname
and the Phone Number. I would like to so that after the user puts date in the
three required fields the Sub form becomes visible. The sub Fm is
Processing_List_Con_Fm
 
In the after update event of each of your controls just add
SetSFVisibility... e.g.

Private Sub txtFName_AfterUpdate()
SetSFVisibility
End Sub

....and then...

private sub SetSFVisibility
me.Processing_List_Con_Fm.visible=not (isnull(me.fname) or isnull(me.lname)
or isnull(me.phonenumber))
end sub
 
Wow Thanks Rob!!!

Rob Oldfield said:
In the after update event of each of your controls just add
SetSFVisibility... e.g.

Private Sub txtFName_AfterUpdate()
SetSFVisibility
End Sub

....and then...

private sub SetSFVisibility
me.Processing_List_Con_Fm.visible=not (isnull(me.fname) or isnull(me.lname)
or isnull(me.phonenumber))
end sub
 
No problem. You'll probably want another SetSFVisibility call in the
current event of the form so that it kicks in when you move from record to
record.
 
Back
Top