How to catch the where clause in the Report_Open

  • Thread starter Thread starter Michel
  • Start date Start date
M

Michel

Hi
Ive an Access program who opens a report
Call DoCmd.OpenReport("myReport",,,where)

In the report I've a Report_Open sub in which I'd like to catch the where
clause and modify it.
How can I do this?

Michel
 
The WhereCondition shows up in the Filter property of the report.
However, you cannot tell if the WhereCondition is really applied or not.

Access is supposed to set the report's FilterOn property to Yes if the
WhereCondition is actually applied, and No if no filter is applied. It does
for forms, but it does not do so reliably for reports. You therefore cannot
tell whether the Filter is actually applied, or is a spurious value left
over from a previous filter.
 
Back
Top