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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ship to same as bill to function?

Status
Not open for further replies.

Norem

Technical User
Jan 22, 2004
1
0
0
US
I am a novice Access user so forgive me if this is something simple or built in somehow, but how do I make a ship to is same as bill to checkbox?

example
// this is a mock function
function copyBillingAddress(){
objForm.ship_add1.setValue(objForm.bill_add1.getValue());
objForm.ship_add2.setValue(objForm.bill_add2.getValue());
objForm.ship_zip.setValue(objForm.bill_zip.getValue());
objForm.ship_city.setValue(objForm.bill_city.getValue());
objForm.ship_state.setValue(objForm.bill_state.getValue());
}

You could then call this function when the box is checked.

<INPUT
TYPE=&quot;Checkbox&quot;
NAME=&quot;isShipBillAddy&quot;
VALUE=&quot;Yes&quot;
onClick=
&quot;if(objForm.isShipBillAddy.getValue()=='Yes') copyBillingAddress();&quot;
>
 
Seems that you could make it a little easier than the above. If you make the check box have an after update function on the form that said call function populate_ShipTo or what not, and just did the following:

function blah bla
me.form.Shipaddress1 = me.form.billname1

and so forth.

ChaZ


Ascii dumb question, get a dumb Ansi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top