Filter criteria using list boxes on a form

J

JB63

If I use several list boxes on a form to filter the data displayed on a
subform using the subform's "record source" SQL statement, how can I have the
query return all of the data if nothing is selected in the list box. as of
now no records are shown if one of the list boxes is empty. Thanks for any
help.
 
K

KARL DEWEY

Use the list boxes as criteria in a query that feeds the subform.
Criteria would be like --
Like [Form]![YourFormName]![Listbox1] & "*"
and to include those that are null use --
Like [Form]![YourFormName]![Listbox1] & "*" Or Is Null
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top