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

Updating form fields from lookup 1

Status
Not open for further replies.

ad2

Technical User
Dec 31, 2002
186
US
I have an order form on which I want to auto fill the customerID, address, and phone by pulling that data from the customer table.

The customerID type is text (value is AlphaNumeric). Type is the text in both the Customer table and Orders table

I have a combo box on the order form for the customerID, it pulls the ID from the Customer table and stores the value in the Orders table.

But on the order from, after choosing a customerID from the combo box, only that field has a value. The customerID, address, and phone are not filling-in. Is this because the customerID has a text type?
 
Change the row source property in the combo box to include addess and phone. In the combo box properties, tell access it has 3 columns.Set columns 2 and 3 width to 0.

In the after update of the combobox, use code like the following:

me.txtAddress = me.cboCustomerID.coloumn(1)
me.txtPhone = me.cboCustomerID.coloumn(2)


Tyrone Lumley
SoCalAccessPro
 
Thanks, works great now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top