copy from one text box automaticaly

A

ascottphelps

ok,on a form, i have a" service address" and a" billing address" most of the
time these two will be the same address. however there will be differences.
now my question is, can i get the" billing address" to automaticaly copy the
"service address" so i dont have to type it twice ? thank you>>>
 
K

KARL DEWEY

I like macro instead of code but it can be done both ways.

Create a macro to SetValue.

Item
[Forms]![YourForm]![Service Address]

Expression
[Forms]![YourForm]![Billing Address]

In your form set the Billing Address property On Double Click to call your
macro.
 
S

SusanV

Hi Andy,

Since you won't always have the same address for both fields, I would
approach this by using a button to populate the address if duplicate.
In the button's OnClick event, use code similar to the following (for the
example I'm using service as service address textbox and billing as billing
address textbox):

Dim strAddress as string
strAddress = me.service
me.billing = strAddress
 
B

BruceM

Do you mean you want billing address to be the same as service address when
you create the customer record, or when you create an invoice or some such
thing? If the former, consider populating the billing address text boxes in
the After Update event of the Service Address text boxes. That way if the
service address changes the billing address will also. You could also just
leave Billing Address blank, and use Service Address as Billing Address in
invoices, reports, etc. unless there is are values in the Billing Address
fields.
 
Top