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

Four Combo Boxes to One Unbound Text Box 1

Status
Not open for further replies.

KayJen

Technical User
Oct 22, 2001
36
US
I currently have four combo boxes to fill in one unbound text box. The information used to fill in theses boxes comes from a written report, however I can't control in what format it will be written. There are 5,000 primary names and some of these names might have secondary and/or third alternate numbers, etc. I use this data to print out charts based on the primary name, without it the charts are hard to understand. Currently I have a various combo boxes labeled as below:

TEXT BOX Name NO1 NO2 NO3
Data from ComboBox Proper Name # # #

If you select NO1 the Proper Name is filled in the text box and so on. Instead of a Text Box and four combo boxes, I would like to know can I have one combobox in which I can type the Proper Name and it pops up, are if I type the number stored in NO1 and so on the Proper Name again will pop up. I have a table already designed.

If I type Apples it pops up, now if I type NO1 which is in the adjoining columm, which lets say is 05, when I type in 05 I would like Apples to appear instead of item not in list. If this is possible any help would be appreciated.

Thanks
 
I'm not sure this is the best way to do it, but it should work. Base your combobox on a query (i.e. Union query) that contains 2 columns. The first column would contain the contents of ProperName, NO1, NO2, NO3. The second column would contain the ProperName associated with the 1st column and the second column is hidden. (Obviously this is redundant when the 1st and 2nd column are the same (ProperName).) Now set the control source of your text box equal to the 2nd column of the combobox. Here's an example,

ProperName1;ProperName1
ProperName2;ProperName2
NO1;ProperName1
NO2;ProperName2
...

TextBox
ControlSource... =YourCombobox.column(1)
 
Thanks for the quick reply this appears to be exactly what I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top