Determine if WhereCondition is Used when Opening Report

JonMulder

Registered User.
Local time
Today, 08:39
Joined
Apr 9, 2011
Messages
23
Is there a way to determine if the "WhereCondition" has a value when opening a report?

I'd like to add a string variable to the header of my report (saying what the limiting criteria is) if the "WhereCondition" was invoked when running the DoCmd.OpenReport.

Is the "WhereCondition" a property/variable of the report that I can check in the "OnOpen" procedure?

Thanks,

Jon Mulder
California Department of Water Resources
Red Bluff, CA
 
I'm pretty sure the wherecondition is placed in the filter property, so test that. It worked for me in a brief test.

Code:
Private Sub Report_Open(Cancel As Integer)
  MsgBox Me.Filter
End Sub
 
That's just what I needed! Thanks very much, John!
 
John says you're welcome; so do I. ;)
 

Users who are viewing this thread

Back
Top Bottom