I have a form in Access where I run a query based on several text boxes. I apply criteria on several of the query fields that is pulled from the text boxes but would like th
You can try the technique described here.
For each search box, use boolean logic to either filter for its value, or ignore this AND clause if it's empty, by making the AND clause TRUE.
I'll just use two search boxes as example:
SELECT stuff
FROM Events
WHERE ((Events.Machine = [Forms]![SearchEvent]![Machine_TextBox])
OR ([Forms]![SearchEvent]![Machine_TextBox] Is Null))
AND ((Events.[Event Description] Like "*" & [Forms]![SearchEvent]![EventDetails_TextBox] & "*")
OR ([Forms]![SearchEvent]![EventDetails_TextBox] Is Null))
AND ...