View Full Version : Combo Box as criteria for Query??


louis
01-24-2002, 06:22 PM
I have created a form with unbound text box as criteria for a query. In the criteria section of query i have written:

[Forms]![FORM NAME]![UNBOUND TEXT BOX NAME]

When i run the form i type in the text that i want the query to be based upon. This works fine. I have re-created this same scenario but instead i used an unbound combo box with my customer names. I would like to run a query by my customer names. I keep getting a blank report. It is identical to the example above in every way except that i do not have to type the information i just choose it from the list. I'm confused, Please Help.

Fizzio
01-25-2002, 02:16 AM
If you have used combo-box wizard, It is likely that your combo box is set up as following
column1 = IDcode, Column2 = Customer name.
It is likely that you will only see the customer name as the IDCode column will be set to width = 0
When you run the query, I am assuming you have the criteria in your customer names field. If you are using a combo, the value it will use will be the ID code, not the name. The best solution is to put the criteria in the CustomerID field in the query. Let us know if this is not your setup.
HTH

louis
01-25-2002, 02:37 AM
I can't believe i missed something so simple. U were right although the visible info in the combo was the right information the box was using the hidden (set to 0cm) first column as the workable data.
Thanks.