Copy contents of fields to other fields, with macro?

Dinictus

Registered User.
Local time
Today, 23:53
Joined
Nov 30, 2004
Messages
22
Hi,

I hava a small dbase in which we store address information. Now you have a visit address, a mailing address and billing adress.

I want to use some buttons which trigger macro's to fill in these "Secondairy" addresses FROM the visit adress.

So a buttun that says: copy billing address from visit address. and then the street, Number, PO box en city will be copied from the visit address to the billing address.

It's probably possible through a macro but I'm having a hard time coming up with the syntax. Or it there an easier way? :confused:

I hope you guys can help me out. THANKS!!
 
SetValue should work, try using the BUILDER to get it right. You can use VBA also.
 
Make this the day you give up macros.

In the AfterUpdate event of each of the visit address fields, copy the value to the cooresponding billing address field if it is empty.

Code:
If IsNull(Me.BillAddr1) Then
    Me.BillAddr1 = Me.VisitAddr1
End If
..
..
If IsNull(Me.BillAddr2) Then
    Me.BillAddr2 = Me.VisitAddr2
End If
 
yeah!

yeah yeah!!

I'm learling..

Thanks. (it works with both the options given but I prefer code.

Thanks once again guys!
 

Users who are viewing this thread

Back
Top Bottom