J
JB63
When I use a list box as criteria in the sql statement to filter data I would
like to return all data if the box is left blank, any Ideas?
like to return all data if the box is left blank, any Ideas?
JB63 said:I use multiple list boxes in a form to display data in a subform on the
form,
I sort this data using criteria in the subform's SQL ,"ex. EquipmentID
(criteria) [Forms]![LogSearch]![EquipmentID] and ShiftID (criteria)
[Forms]![LogSearch]![ShiftID]" I would like the form to display all of the
logs when the list box is left blank.
Thanks for the reply i am new to this forum.
Klatuu said:Post the SQL so we can see what it looks like now, please.
When I use a list box as criteria in the sql statement to filter data I would
like to return all data if the box is left blank, any Ideas?
John W. Vinson said:When I use a list box as criteria in the sql statement to filter data I would
like to return all data if the box is left blank, any Ideas?
= [Forms]![YourForm]![YourListtbox] OR [Forms]![YourForm]![YourListbox] IS
NULL
This will only work for a single-select listbox, though; if you are using a
multiselect listbox you'll need some code.