Null Combo Box; Show All Records

jsanders

If I Only had a Brain
Local time
Today, 14:47
Joined
Jun 2, 2005
Messages
1,910
Hello All,

I’m using a combo box for the criteria for a saved query. Is there any way to show all the records if the combo box value is either “0” or null?

Thanks,
 
i think there's a docmd.showallrecords but i've never used it and am not sure if it will work in this case.
 
Last edited:
Are your combo box values coming from a value list or a table?
 
Sergeant said:
Are your combo box values coming from a value list or a table?
The Combo Box is populated from a table.
 
I did this once for a similar situation:
In the table that feeds your combo box, add a record where the value for the combo box will be "*". If you have separate value and text for your combo box, you can make the text "All". Set the value of the combo to "*" either in the form_load or whatever.
Then in your query that references your combo, change the criteria's "=" to "Like".
Specific values will match without wildcards on the Like criteria, but if you leave the * in the combo, all records will be pulled.
 

Users who are viewing this thread

Back
Top Bottom