subform to appear only if checkbox marked

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

Guest

I have a form that contains client information, including the client's main
address. I have a subform that contains alternate billing address for the
client. Since not all clients have an alternate addresses, I would like this
subform to appear only if the user checks the checkbox stating that there is
an alternate address.

Any ideas on how to accomplish this is greatly appreciated.
 
On the after update event of the check box enter the code
Private Sub checkboxName_AfterUpdate()
If me.checkboxName = True then
me.subformName.visible=True
Else
me.SubFormname.visible=False
End if
End Sun
If you open this form to edit records, or just move between records then, on
the on current event of the form call the after update sub that you created.

call checkboxName_AfterUpdate
 
Thank you very much.

Ofer said:
On the after update event of the check box enter the code
Private Sub checkboxName_AfterUpdate()
If me.checkboxName = True then
me.subformName.visible=True
Else
me.SubFormname.visible=False
End if
End Sun
If you open this form to edit records, or just move between records then, on
the on current event of the form call the after update sub that you created.

call checkboxName_AfterUpdate
 
I'm having some difficulty making this work. Is there another step that
perhaps I'm missing?
 
Back
Top