
Originally Posted by
rpeare
You can search your ID field with wildcards too, just be aware you're going to capture a bunch of stuff you may not want.
Your WHERE statement would be
WHERE ((([Tbl_Main].[descrip]) Like "*" & [Forms]![Tbl_Main Query]![textSearch].[Text] & "*" OR ([tbl_main].[ID#]) like "*" & [forms]![tbl_main Query]![textSearch].[Text] & "*") And [Forms]![Tbl_Main Query]![textSearch].[Text]<>""))
What are you trying to do with the
And [Forms]![Tbl_Main Query]![textSearch].[Text]<>""
portion of this where clause? Return no results if there's nothing typed in? Return everything if nothing is typed in?
If you want to return nothing (no records) if nothing is typed in you can prevent the query from running at all just by checking for a null value in the field.
If you are trying to return all records if nothign is typed in you don't need this statement at all.