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

Populate text box based on combo box

Status
Not open for further replies.

bmc1234

Programmer
Jul 21, 2005
50
US
I have a table storing productID, part#, description, and NSN. I have a second table with a field called productID that is linked to the first tables productID. In a form that stores data to the second table, I want to have two text boxes that display the description and NSN when the productID is selected from a combo box.

It seems so easy, but I can't figure out how to do it. Can anybody help? Thanks.
 
Have a look at the Column property of the ComboBox object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks, I figured it out. all I did was include the description and nsn fields in the combo box but didn't show them and then referred to them in the text box.
 
all I did was include the description and nsn fields in the combo box but didn't show them and then referred to them in the text box.

how did you refer to them in the text box?

I have these fields in the combo box that are from a different query...
flddoc#
fldclass
fldviolation

I also have three text boxes in the form of the same name.
When I choose one of the violations from the combo box I want the doc# and class fields to be populated with the corresponding record for that violation.

 
You can set the control source of a text box to:
=ComboboxName.Column(1)

Where (1) is the relevant column number, starting at 0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top