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

Autofill fields based on value in combo box 1

Status
Not open for further replies.

nlc

Technical User
Mar 20, 2002
6
0
0
US
Hello -
I'm trying to create an order form for a customer database. I have a subform based on a table with product name, part number and price. I would like to have the part number and price fill in automatically based on the product name selected from the combo box.
Help!
Thanks,
J
 
Put code in the Lost_Focus event procedure for your combo box to update the other values.

Good Luck!
 
Thank you, but do you have an example of the code to put there?
 
An easy way to do this is is to include the part number and price with the product name in your combobox record source.
The control source for the price, for example would be something like =CboProduct.Column(1). Column 1 (price)would be the second field in the combobox. Product name would be Column 0.

Hope that helps.
 
Thank you so much, it works beautifully!
 
Your welcome. Just remember it doesn't permanently store those values - just displays them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top