Using Check Box To Copy Fields

marcja

Registered User.
Local time
Today, 22:22
Joined
Jul 12, 2006
Messages
12
If you can imagine my form has 5 postal address fields (address1, address2 etc) then it has 5 shipping address fileds.

Can I use a check box, that when ticked will copy all the postal address fields into the shipping address fields??

I ain't no expert mind you so please go easy on.

Thanks.

M
 
I won't go into the issue of this probably not being normalized, but to copy data from one text box to another, in the after update event of the checkbox you would have:

If Me.YourCheckBoxNameHere Then
Me.YourShippingAddress1 = Me.YourPostalAddress
'... put others here
End If


Just add the additional text boxes before the End If. As a quick explanation, the ME keyword refers to the current form, or report (depending on where the code is) and the "If Me.YourCheckBoxNameHere Then" is simplified because it means the same as "If Me.YourCheckboxNameHere = True Then.
 
Sounds spot on Bob, I'll try that, thanks very much.
 

Users who are viewing this thread

Back
Top Bottom