Hi,
I have created a multi field search form, which executes a query based on the information entered in the search form.
In my query, the search criteria for each field I am searching on is Like "*" & [Forms!]![SearchForm]![fieldname1] & "*".
My table which my query pulls from may have blank cells in the fields which I am searching on. I have 6 fields in my search form.
When I only enter search criteria in the search form for some of the fields (for example 4 of the 6 fields) it doesn't return the records which match the criteria that I have entered if the 4 fields of my search form, if the cells in my table are empty for one of the other 2 fields pn the search form for which I did not enter anything.
I am trying to use an if statement as the search criteria to say IF the search form box is NOT NULL, then Search for Like "*" & [Forms!]![SearchForm]![fieldname1] & "*". but IF the search form box is NULL, then don't use the search form as a criteria but return all records.
Can anybody help with the syntax for this IF statement?
Any insight or help would be really appreciated!
Thanks.