Check box

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

Guest

I want to populate my shipping address fields with my billing address fields
when checked. How?
 
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
 
Back
Top