Can not save the filter for the report

G

gad

How can I save the filter in the report disign view? it is not saving it.
I press save and confirm the save but it dose not saving it.
what can I do?
 
A

Allen Browne

The Filter property should save easily enough, but this is not a reliable
way to filter your report:

a) The report's FilterOn property is not set by default. You will therefore
need to add some code to the Open event of the report to apply the filter:
Me.FilterOn = True

b) The Filter property will be changed in different circumstances (e.g. if
you use a WhereCondition when you OpenReport), so you might want to consider
some other ways to filter your report if you want a consistent filter.

The simplest alternative is to create a query with criteria that filters
your report. Another approach is to use a button on a form to open the
report and filter it as you wish. There's an example of both approaches
here:
http://allenbrowne.com/casu-08.html
http://allenbrowne.com/casu-15.html

(BTW, in Access 2007, reports do have a FilterOnLoad property. If you set it
to Yes, the filter is applied when you open the report, without needing the
code in the Open event.)
 
Top