Hi I am doing this in my search criteria of a query in the Comments field of a table based on information passed from a form "frm_search"
which works fine except for the fact that access splits this into two rows in the query design table. one for the first statement and the second for the or statement.
This is becoming a problem for me because i use more than one of the code above so if I use it twice, I get four rows and three times I get eight rows... you get the idea. That forces me to rewrite the other search criteria 7 times.
Is there any way to rewrite the expression above so access doesn't try to split the expression into two rows?
Alternatively the expression I used before was
The problem with that is it doesn't show entries with empty fields. I would like to be able to see those entries with empty fields which is why i had to resort to the first method. Answering either of these problems will solve everything for me. thanks in advance!
Code:
Like "*" & [Forms]![frm_Search]![Comments] & "*" or [Forms]![frm_Search]![Comments] is null
which works fine except for the fact that access splits this into two rows in the query design table. one for the first statement and the second for the or statement.
This is becoming a problem for me because i use more than one of the code above so if I use it twice, I get four rows and three times I get eight rows... you get the idea. That forces me to rewrite the other search criteria 7 times.
Is there any way to rewrite the expression above so access doesn't try to split the expression into two rows?
Alternatively the expression I used before was
Code:
iif(isnull([Forms]![frm_Search]![Comments]),[Comments],[Forms]![frm_Search]![Comments] )
The problem with that is it doesn't show entries with empty fields. I would like to be able to see those entries with empty fields which is why i had to resort to the first method. Answering either of these problems will solve everything for me. thanks in advance!