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!

Binding multiple columns in Combo Box Lookup

Status
Not open for further replies.

bhujanga

Programmer
Oct 18, 2007
181
US
When creating a Combo Box there is a property called "Bound Column" which is the field that it uses to retrieve information. What if you need more than one column to uniquely identify the record to retrieve information from. For example, we update recipes for products, but need to retain the old recipe info to the records for batches we've already made can be accurately reported. Hence I have the same product description but a different "Version". So I want to create a combo box lookup that I pick the product and version, and both of them become present in the batch record so it will pull the right recipe data. I can easily get them both to show up in the drop down list, but it only cares about the one specified in the 'bound column' property. Is there an easy way to get it use both as the criteria?
 
What about using the Column property of your ComboBox ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I don't know what you mean. I'm not seeing a property that's just "Column". There's just the bound column, column count, etc. What is the 'Column' property and how is it used?
 
When in the VBE the F2 and F1 keys are your friend.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
gee... thanks a lot
If anyone would care to post a serious reply, I'm still interested in an answer to this question.
Thanks.
 
I might have to do that but I'd prefer they not have to select two different components every time. I was hoping that there was a way for combo box look ups to be based on multiple fields or columns, but this must not be the case. I have another idea though that might work. I'll use a DMAX function to set the version to the latest one for the selected product, before pulling the other data. Then if they do change the version from that default, it will requery. But this way, except for unusual cases they'll still only have to select the product. What it does now is gets the lowest version, which is problematic.
Thank you.
 
bhujanga said:
What if you need more than one column to uniquely identify the record ...
Although the bound column represents a single field, typically when the combo list is dropped down you can show as many fields as are in the RowSource of the combo. It could be as simple as showing you version field in the list. See the Column Widths property on the format tab.

Your Thoughts? . . .

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top