Hide the Sub Fm

K

KAnoe

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
 
R

Rob Oldfield

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
 
K

KAnoe

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
 
R

Rob Oldfield

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.
 

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