I am working on a survey database and the client wants scholars to take 6 different surveys within 6 different weeks. The client wants to be able to select a scholar (ex. Mary Smith) and a survey (ex. Week 1) and view the results in a report. The client also wants an option to view all scholars and/or all surveys in the report. It works fine when I put the following in the criteria for scholars:
[Enter Scholar Name] or Like [Enter Scholar Name] Is Null
I also put the following in the criteria for the survey field:
[Enter Survey] or Like [Enter Survey] Is Null
When I run the query it does exactly what I want to do. I run into problems when I try to use combo boxes from a form to get the values for the parameters in the query. I have 2 combo boxes named cxScholar and cxSurvey and I change the criteria in the query to the following:
For the scholar field I type:
[Forms]![fMakeSelection]![cxScholar] or Like [Forms]![fMakeSelection]![cxScholar] is Null
For the survey field I type:
[Forms]![fMakeSelection]![cxSurvey] or Like [Forms]![fMakeSelection]![cxSurvey] is Null
When I get the values from the combo boxes on the form and then run the query, I always get this error message:
“This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables. “
I noticed it works fine using the form with just one parameter in the query but I get the error message with more than one parameter in the query. I had no idea how to do this and I learned a lot through research. I would like to know what I am doing wrong and is there a solution to this. Thank you so much in advance for your help.