Hi,
I am building a parameter query in Access that refers to the controls on a form for its criteria. I am looking for something that lets the user pick one or more of the filters on the form that they want to use, so in the criteria for each field of the query I have the following structure:
[Forms]![frm_advSearch]![cmb_Item] OR [Forms]![frm_advSearch]![cmb_Item] Is Null
In the above example, the control is cmb_Item in frm_advSearch. The problem is that if I fill in the query grid this way for all of the fields, save and close the query, and then reopen it, Access creates a huge SQL statement that's literally pages long and then throws up the error Query is too complex.
Is there a better way to include the possibility of null controls? I tried looking up this problem on the Internet and found the below thread on this forum, but to be honest, I didn't really understand how to apply the solution to my own database. I am brand new at VBA (this is my second week building this database for the company I intern at; we used pen and paper to track our inventory of around 500 devices. I made them an excel spreadsheet when I first got hired about a month ago, but shortly afterwards I discovered Access and databases and I've been trying to learn Access and VBA all on my own). Thanks for any help you can provide! I can post my database as there is no data in it yet.
How do I Workaround Query Being Too Complex