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?
 

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

Back
Top