Combo Box feeding parameters to query problem

GingGangGoo

Registered User.
Local time
Today, 08:54
Joined
Dec 14, 2010
Messages
121
I have a form called ContactList that I would like to filter by contact's position. I have an unbound form with a combo box on it for choosing the position I want to filter by. I pointed to this combo box in the criteria on my query.

When I make a selection in the combo box and click ok, the query runs but it returns a blank datasheet. If I go into the query and put in the criteria and run the query, I get the contacts I want, but it's not reading what I've chosen in the combo box and filtering for that. What am I missing? The position field in the query on which I have my criteria is a multivalue field, if that makes a difference.

Help
TIA
 
How are you referencing the Combo Box in your query? How is your Combo Box set up?
 
How are you referencing the Combo Box in your query? How is your Combo Box set up?

in the criteria of the Position field I have [Forms]![PosList]![cmbPos]
My combo box gets its list from a table, where my 4 choices are stored.
 
What is the bound column value of your combo box you are reffering in your form to filter the records? I belive it's not the same column field value you are selecting in your query criteria... is this the case?

Please note that in combo box has two values to handle
1 - Bound column (use to handle the field value for criteria)
2 - Count column (use to show the combo box list)
 
What is the bound column value of your combo box you are reffering in your form to filter the records? I belive it's not the same column field value you are selecting in your query criteria... is this the case?

Please note that in combo box has two values to handle
1 - Bound column (use to handle the field value for criteria)
2 - Count column (use to show the combo box list)

I think your are right, I've done some more learning about how multivalued fields work, so that's good. I think the problem is my combo box is trying to look up the display names but the query is based on the bound value. So the question is, how do I fix this.
 
I think your are right, ..... I think the problem is my combo box is trying to look up the display names but the query is based on the bound value. So the question is, how do I fix this.

Yeah, I believe this is the case. In your query criteria the field/column is different than what you are selecting in your combo box.
To fix this:
· check the count columns, the number of columns to show is more then 1?
· also check column width, might be 0";0.5";1" etc
· check the bound column, is it 1, 2 or 3?
in column width notice the 0 column width will not show in your combo list. but it persist in your combo. In more often cases by default access suppress this value column (make its column width to 0) when you create combo box using wizards.
Hope this make sense.
 

Users who are viewing this thread

Back
Top Bottom