copy billing address to delivery address fields

K

khinester

hello,
I have an access db that has a table that contains both
billing address and delivery address fields.

Is there a way that once the billing address fields have
been added I can click a button, and what was added there
to be copied accross to the delivery address?

Any links with examples will be very much appreciated.

Thanks
 
R

Rick Brandt

khinester said:
hello,
I have an access db that has a table that contains both
billing address and delivery address fields.

Is there a way that once the billing address fields have
been added I can click a button, and what was added there
to be copied accross to the delivery address?

In the button's OnClick event...

Me![DeliveryAddress] = Me![BillingAddress]
Me![DeliveryCity] = Me![BillingCity]
Me![DeliveryState] = Me![BillingState]
etc..
 
M

Mike Mueller

: hello,
: I have an access db that has a table that contains both
: billing address and delivery address fields.
:
: Is there a way that once the billing address fields have
: been added I can click a button, and what was added there
: to be copied accross to the delivery address?
:
: Any links with examples will be very much appreciated.
:
: Thanks

Here would be my example:
Fields of: Billing_Attn, Shipping_Attn, etc
For a single command button I would use the following code:

Private Sub Command16_Click()

Shipping_Attn = Billing_Attn
Shipping_Company = Billing_Company
Shipping_Address = Billing_Address
Shipping_City = Billing_City
Shipping_State = Billing_State
Shipping_Zip = Billing_Zip

End Sub

You would still be able to change either information without
affecting the other when copied, such as Attn may be
accounts payable on the one side and receiving on the other
side. You could modify the code also so that the user could
enter differences for the shiiping information, then
duplicate the rest. All you would need to do would be to
add an If...Then statement.

If you would like I can send a demo db to you with some
variations in it

Mike
 
K

khinester

thanks all for your replies, and if you don't mind Mike,
mail me the demo to khinester6666"at"yahoo.com
 
M

Mike Mueller

Done

: thanks all for your replies, and if you don't mind Mike,
: mail me the demo to khinester6666"at"yahoo.com
:: -----Original Message-----
::: hello,
::: I have an access db that has a table that contains both
::: billing address and delivery address fields.
:::
::: Is there a way that once the billing address fields have
::: been added I can click a button, and what was added
::: there to be copied accross to the delivery address?
:::
::: Any links with examples will be very much appreciated.
:::
::: Thanks
::
:: Here would be my example:
:: Fields of: Billing_Attn, Shipping_Attn, etc
:: For a single command button I would use the following
:: code:
::
:: Private Sub Command16_Click()
::
:: Shipping_Attn = Billing_Attn
:: Shipping_Company = Billing_Company
:: Shipping_Address = Billing_Address
:: Shipping_City = Billing_City
:: Shipping_State = Billing_State
:: Shipping_Zip = Billing_Zip
::
:: End Sub
::
:: You would still be able to change either information
:: without affecting the other when copied, such as Attn
:: may be accounts payable on the one side and receiving on
:: the other side. You could modify the code also so that
:: the user could enter differences for the shiiping
:: information, then duplicate the rest. All you would
:: need to do would be to add an If...Then statement.
::
:: If you would like I can send a demo db to you with some
:: variations in it
::
:: Mike
::
::
::
:: ---
:: Outgoing mail is certified Virus Free.
:: Checked by AVG anti-virus system
:: (http://www.grisoft.com). Version: 6.0.505 / Virus
:: Database: 302 - Release Date: 7/30/2003
::
::
:: .
 

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