Auto lookup

cgmckenzie

Registered User.
Local time
Today, 20:39
Joined
Oct 21, 2002
Messages
38
All I need is for the combo box in an order form that looks up a company from a table called "companytable" to fill the address and state in the appropriate places on the form the combo box displays all information but instead i wish it just showed the company name and in the fields on the form for the address and state and so forth it automatically fills in, when the company is choosen from the combo box. I have read twenty different ways to do this and i still can't get it to work. I am no computer wiz so simple is good. I am desperately trying to fix this any help would be appreciated. Thankyou for your time
 
I am not really sure what you are after. If you have an order form I assume that it is a form/subform combination where you select the company in the main form and fill in the order data in the subform. Is that what you are doing? If so, then you only need the CustomerID in the subform, not the rest of the data, and Access will do that for you automatically.

Are you trying to move to a particular record in a form by selecting the company name in a combo box? If so then create the combo box using the wizard and select the 3rd item on the first screen, "Find a record...".

If you need to fill in fields with data from a combo box for display only then use code like this in the After Update event of the combo box:

Me.Field1 = Me.ComboBoxName.Column(x)
Me.Field2 = Me.ComboboxName.Column(y)

Change the names above to the actual names of the unbound controls on your form. In 'Column(x)' x is one less than the actual physical column count. Physical column 4 would be Column(3) as combo boxes are zero based.

hth,
Jack
 
Thank you Thank you I am not possitive everthing is going to work but this a start in the right direction thankyou again.................
 
You are welcome! It will work, but if you have another question just let us know and someone will give you a hand...

Jack
 

Users who are viewing this thread

Back
Top Bottom