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

Populate one field with values from another.

Status
Not open for further replies.

LearnersPermit

Technical User
May 30, 2001
70
CA
I am attempting to create a form similar to the Orders form in the Northwinds.mdb. My biggest problem is that I am trying to fill the Ship To information with that from the Bill To fields if the Ship To information is empty. I have used the statement from the Northwinds Order form, however it doesn't seem to work. Any suggestions. The code used is below.

Private Sub ClientID_AfterUpdate()
' Update ShipTo controls based on value selected in Client_ID text box.
Private Sub CustomerID_AfterUpdate()
Me!ShipName = Me![Client_ID].Column(1)
Me!ShipOrgFull = Me!OrgFull
Me!ShipAddress = Me!AddressAdresse
Me!ShipCity = Me!CityVille
Me!ShipRegion = Me!Province
Me!ShipPostalCode = Me!PostalCodeCP
Me!ShipCountry = Me!CountryPays

End Sub
 
I would probably try to make this as simple as possible. I would put the shipping information in textboxes. I would go into the properties Data section of the textboxes and set the default value to the matching field in the billing section. Like this:

=[Forms]![Me]![ShipName]


I probably wouldn't even bother trying to put the code in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top