We have a database with a mailing address and ship to address. We want the
mailing address to automatically populate to the ship to address but we want
to be able to change the ship to address, if needed, without having an effect
on the mailing address. The Northwind DB sent with Access does that but we
haven't been able to find how it's done.

Signature
kat
Wayne Morgan - 18 May 2005 20:26 GMT
In the AfterUpdate event of the controls where you enter the mailing
address, copy the values to the ship to address. This will allow you to
still modify the ship to address if you want to. You could also create a
button to do this if you prefer.
Example:
Me.txtShippingAddress1 = Me.txtMailingAddress1
You would do this for each control that contains the address information
(i.e. Street Address, City, State, Zip, etc). If you use a button, you would
fill in all of the address controls then copy all of them in the button's
Click event. You may want to allow for a value already being in the shipping
address.
Example:
If IsNull(Me.txtShippingCity) Then
Me.txtShippingCity = Me.txtMailingCity
End If

Signature
Wayne Morgan
MS Access MVP
> We have a database with a mailing address and ship to address. We want
> the
[quoted text clipped - 5 lines]
> we
> haven't been able to find how it's done.
John Nurick - 18 May 2005 22:03 GMT
Hi Kat,
Northwind does it with a few lines of VBA in the AfterUpdate event
prodedure of the CustomerID combobox on the Orders form.
>We have a database with a mailing address and ship to address. We want the
>mailing address to automatically populate to the ship to address but we want
>to be able to change the ship to address, if needed, without having an effect
>on the mailing address. The Northwind DB sent with Access does that but we
>haven't been able to find how it's done.
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.