I want to automate some of our Access Reports with a VBA script. But when I want to run them with DoCmd.OpenReport
, I have the problem that every Report has a Popup for some Parameters coming from the underlying Query.
This is how the Parameter looks like in the Query:
PARAMETERS [Time] Text ( 255 );
I googled a lot and tried with:
DoCmd.OpenReport "B_My_Report", acViewPreview, , "[Time]= 423"
But this didn't work; the popup still comes and when I enter nothing, the query will fail because Time parameter is empty.
Is there a way I can call the Report with the Parameter value. I read a lot of Suggestion to remove the Parameter completely and use the where
condition in OpenReport
. But I can't change these Queries because they aren't made and maintained by me. I only have to run them sometimes. So I would love to have a solution without touching the Report or the Query.