Combobox not returning values

stephvliet

Registered User.
Local time
Today, 18:50
Joined
Aug 19, 2015
Messages
12
I have a parameter query which is based upon a combo box on a form. When I select something from the combo box the query runs, but I get no records returned. If I run the query without the combo box input (just by typing in the criteria), records are displayed no problem. What am I missing?

This is what I have on my Combo Box.

This is what I have in the criteria in my Exec field in my query.
[Forms]![PUNCHLISTBYSUBSYSTEM]![Combo7]

My bound column is correct, however I have lookups in my form and some of the values are null.

Please can someone help:banghead:
 
Put a MsgBox in your code that displays [Forms]![PUNCHLISTBYSUBSYSTEM]![Combo7] and see what is being returned.
 
It might be that your combo is based on 2 columns, the first on the index (not visible) and the second one the information you actually see. You "think" you select the information in the second column, but actually the combo returns the bound column, usually the first.
Do as ruralGuy proposed and check what the combo returns
Or look at properties, data, rowsource and check what is selected here
 
create a hidden textbox control on your form.
now on after update event of your combobox, fill the value of the new textbox:

private sub combo7_afterupdate()
me.yourNewTextbox.Value = nz(me.combo7.column(1))
end sub

now set the criteria of your query to this new textbox:
 

Users who are viewing this thread

Back
Top Bottom