Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing Filter on report

Status
Not open for further replies.

jcarmody

Programmer
Apr 25, 2002
39
0
0
US
Hello:

Through this forum I found a slick way to include a date picker as an on open event for my reports to allow the user to choose a starting and ending date range. Works slick, thank you. In the report header I print the filter to alert the users that the report has filtered data.

=IIf(Report.Filter<>"","Filtered to show: " & Report.Filter)

My report.Filter looks something like this:
Date Between #2/1/08# and #2/18/08#

Is there a way to leave the # in the filter but not print them in my report header.

It doesn't bother me, but I know I'll get questions.

Thanks -

JC
 
OK, now you're going to find out how little I know. Where do I put this?
 
Try this
=IIf(Report.Filter<>"","Filtered to show: " & Replace (rpt.filter, "#", ""))

If this does not work use vba
probrably in the report_load

dim vfilter

vfilter = Replace (rpt.filter, "#", "")
txtboxfilter =IIf(Report.Filter<>"","Filtered to show: " & vfilter)

txtboxfilter is whatever txtbox in your header

ck1999
 
Thank you!!! Your first suggestion worked like a charm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top