Check box

G

Guest

I want to populate my shipping address fields with my billing address fields
when checked. How?
 
G

Graham R Seach

Jimmy,

Assuming the following:
1. That your billing address is in a textbox called, let's say,
txtBillingAddress.
2. That your shipping address is in a textbox called txtShippingAddress.
3. That the checkbox is called chkUseBillingAddress.

Add the following to the checkbox's AfterUpdate event:
Private Sub chkUseBillingAddress_AfterUpdate()
If Me.chkUseBillingAddress = True Then
Me.txtShippingAddress = Me.txtBillingAddress
Else
Me.txtShippingAddress = ""
End If
End Sub

When the checkbox is ticked, txtShippingAddress will contain the address
found in txtBillingAddress. When the checkbox is cleared, so will
txtShippingAddress.

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 

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