Dig

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a form in access that has a sold to fields on one side and bill to
fields on the other.

Since most times they are usually the same is there a way to have the
information that is put in the sold to fields automatically show up in the
ship to fields?

Also if I can do this can the user overwrite it with different info if they
need to?

Thanks
 
Try using the controls OnExit Event....

Put this code in the OnExit event of your textbox (assuming you will change
the names to reflect your actual names). What this will do is take the text
from the Customer Address and copy it to the Shipping Address as soon as you
tab out of the text box.



me.txtShippingAddress = me.txtCustomerAddress



If you need to change the shipping address, simply tab or click into the
textbox and type over.

Do the same for your other Sold to fields.
 
In the AfterUpdate event for each SoldTo field, you can have it copy the
data to the corresponding ShipTo field. The user can, at any time, change
this info; just remember that if they change the SoldTo field, it will once
again copy itself to the ShipTo field. Here's some air code as an example
to copy from a control named SoldToName to a control named ShipToName; put
it in the AfterUpdate event of the SoldToName control:

If Not IsNull(Me.SoldToName) Then
Me.ShipToName=Me.SoldToName
End If
 
Back
Top