A Report, based on query, called from macro is prompting for param

  • Thread starter Thread starter JackG
  • Start date Start date
J

JackG

I have a report that is based on a query. The 'Program' field in the query
has criteria defined (example: "Highroad" Or "DrugFree". The query runs fine
alone, the report runs fine and does not prompt me for 'Program' when I run
it and the correct records are selected. In the Macro I am using OpenReport,
when the report runs I am being prompted for 'Program' values; it is no
longer seeing my predefined parameters. I have tried to create an expression
for the Where Condition and failed. Either, what do I need to do in the
macro to get the report based on the query to run correctly as it does
outside the macro OR what is the syntax in Where Condition that will
pass the value "Highroad" Or "DrugFree" to select only those records? Table
is 'Client' field in table is 'Program', query is CRF-List-Query, report is
CRF-List-Report. Thanks in advance.
 
Jack,

I can think of no explanation for the behaviour you have described. It is
strange. I would normally expect a report that runs correctly when opened
directly, to also run correctly when opened via a macro.

Anyway, the Where Condition for the OpenReport action as described would be:
[Program]="Highroad" Or [Program]="DrugFree"
 
Back
Top