JohnnyProd
Technical User
I'm trying to create a report which accepts a paremeter which narrows the scope of my data. More specifically, when a user runs this report it prompts them for 'mm/dd/yyyy' and uses this info to only display the day he/she is interested in. I have done this in the past by placing a query between the report and table which looks like the following:
SELECT ...
FROM ...
WHERE ... (Format([Field_With_Date],"mm/dd/yyyy")=[mm/dd/yyyy]);
The problem I am having is that when I run the report I am getting the error:
"The Microsoft Jet database engine does not recognize '[mm/dd/yyyy]' as a valid field name or expression"
However, when I run the query iself, I am prompted for 'mm/dd/yyyy' as expected and everything works fine. Any ideas? I'm still new to VBA and I'm not sure if there is a way for me to place parameters in a report, so up till now I have been placing them in a query. Any help is appreciated, thanks.
SELECT ...
FROM ...
WHERE ... (Format([Field_With_Date],"mm/dd/yyyy")=[mm/dd/yyyy]);
The problem I am having is that when I run the report I am getting the error:
"The Microsoft Jet database engine does not recognize '[mm/dd/yyyy]' as a valid field name or expression"
However, when I run the query iself, I am prompted for 'mm/dd/yyyy' as expected and everything works fine. Any ideas? I'm still new to VBA and I'm not sure if there is a way for me to place parameters in a report, so up till now I have been placing them in a query. Any help is appreciated, thanks.