thread703-1476741
The above thread was very useful to me. However I am using the same code that Hookum provided and I am getting an error.
The code is basically doing exactly the same as before and is being started on a button click. The first time I click the button after opening the form and entering search criteria, I get the report as expected. The form remains open and if I go back to it, clear the search criteria re-select another set of criteria and then click the report button again I get the error.......
Runtime error 3075
Syntax error (missing operator) in query expression '(1=1 AND Amount = AND ExpID= "" AND etc etcetc )'.
The debug highlites the line
DoCmd. OpenReport strReportName, acPreview, , strWhere.
If I close the form and reopen it and enter new search terms and click the button it works.
Any help appreciated.
Smalty
The above thread was very useful to me. However I am using the same code that Hookum provided and I am getting an error.
The code is basically doing exactly the same as before and is being started on a button click. The first time I click the button after opening the form and entering search criteria, I get the report as expected. The form remains open and if I go back to it, clear the search criteria re-select another set of criteria and then click the report button again I get the error.......
Runtime error 3075
Syntax error (missing operator) in query expression '(1=1 AND Amount = AND ExpID= "" AND etc etcetc )'.
The debug highlites the line
DoCmd. OpenReport strReportName, acPreview, , strWhere.
If I close the form and reopen it and enter new search terms and click the button it works.
Any help appreciated.
Smalty