Report criteria displayed on report

I imagine an expert has ran into  this:  forgetting the report has certain data filtered out.  This can be dangerous to forget for obvious reasons.  

How could I "remind" myself that the source data is filtered without having to open the report query criteria?  Possibly a text box that simply says "data is filtered" or "data is not filtered" or some other reminder that displays on the face of the report.

Looking for ideas.
Thank you
pdvsaProject financeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
On the Format event of the section with your control, ...put code like this:

Dale FyeOwner, Developing Solutions LLCCommented:
Depends on how you are doing the filtering.  If you have a filter in the reports record source, it would be a bit more difficult.  But if you used the where clause of the openreport method you can check the reports filter property.  I would do this in the reports open event.
For reports that are filtered, I almost always use a common report form to minimize the coding.  In this form, I create the where clause based on the criteria selected by the user.  So, the reports, refer to a control on the reports form to pick up whatever criteria was created.
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Jeffrey CoachmanMIS LiasonCommented:
With any technique, ...remember that the Field Name, or the Value ...may not very "friendly" ...

For example, in one of my reports, the filter displays as:
(Translation: Rack Space=Farmingdale)

So here you can display the filter for admin or developer notes, ...but for the user, might need to create a system to look up the "friendly" expressions.

pdvsaProject financeAuthor Commented:
I think this is more complicated than I thought.  

Jeff:  thanks but that didn't seem to work.  Possibly I am not implementing correctly but I did make an unbound text named txtFilter and used the code On Format for the REport Header which is where the txtFilter is located.
Dale FyeOwner, Developing Solutions LLCCommented:

What is the code you are using to open the report?  Does the OpenReport method include a Where or Filter argument?

What is the SQL for the reports RecordSource?
pdvsaProject financeAuthor Commented:
Hey Dale, I will respond tomorrow.  I am drinking now and releasing anger that has built up working in corporate America.
Dale FyeOwner, Developing Solutions LLCCommented:
Good for you, Tony.  

Hoist one for me, but don't drink and drive!
Jeffrey CoachmanMIS LiasonCommented:
eff:  thanks but that didn't seem to work.

You did not post the syntax you used...
So I cannot say what happened

For text it is: something like this when actually filtering the report:
"eDept=" & "'" & Me.Combo0 & "'"

...For Numbers it would be like this:
"eDept=" & Me.Combo0

Then on the format event of the reports section, do something like this:
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
   Me.Text36 = Me.Filter
End Sub

...This all works fine for me,...sample attached...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jeffrey CoachmanMIS LiasonCommented:
pdvsaProject financeAuthor Commented:
thank you....
Jeffrey CoachmanMIS LiasonCommented:
so what was the sticking point for you?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.