Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkbox quick and easy question

Status
Not open for further replies.

AidanEnos

MIS
Dec 11, 2000
189
ok, I have a Customer info form

has Customer, Street Address, City, etc.
also has Billing Street Address, Billing City, etc..

I have a check box that says "Customer Bill to" same as shipping? with the check...

I want to make the code...

IF CheckBox is check (not sure of how to syntax this) THEN
address=billtoaddress, city=billtocity, etc.

Else

I know what I want here so won't bother with the details ;)

Thanks
 
Code:
If Me.chkSameBillToAddress = True then
   Me.BillToStreet = Me.Street
   Me.BillToCity = Me.City

   etc

End if

However, something to think about - You may just wish to retain the regular address but not copy the info the Billing Address fields because what if the regular address changes, then you (or the user) will have to "remember" to change the billing address too. I would NOT copy the data to the BillTo address, and instead on any forms or reports I would put in the Bill To Address section a calculated control for example in the street part:

=iif(chkSameBillToAddress = True,[Street],[BillToStreet])


That way you are not storing possibly bad info or having to make more buttons or code to make sure the BillTo address is "updated" every time the regular address is updated.

My two cents...

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244. Basics at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top