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!

Use second field from COMBO Box

Status
Not open for further replies.

cschnable

Programmer
May 24, 2001
36
US
If I have a form with 2 fields, such as Part_Number and Part_Price, and I use a 2 collumn (Part_Number, Part_Price) Combo Box in the Part_Number field to enter the Part_Number.

How do I have the part price automatically be entered into the Part_Price field on the form?
 
Part_Price = Me!cboPartsList.Column(1) Terry M. Hoey
 
Don't quite understand

Do I enter this commmand into the Properties, Default line of the Part_Price field.

If not where?
 
I would put it in the OnUpdate event of your combobox. Terry M. Hoey
 
It shows an error and states the following

Cannot find Macro which named Part_Price = Me!cboPartsList.Column(1)
 
cschnable,

If this is a bound form and Part_Price is a bound textbox, you should use the combo box to move to the record that has the selected Part_Number.

Use the Combo box wizard to create a combo box and select "Find a record on my form based on the value I selected in my combo box." You will only have to include the Part_Number in the combo box and the bound textbox, Part_Price will be populated with the appropriate price.

If it is not a bound form, do not use a bound textbox for Part_Price and follow Terry's advice:

Code:
   TextBoxName = Me!cboPartsList.Column(1)


HTH John

Use what you have,
Learn what you can,
Create what you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top