Help on Date Filters :) (1 Viewer)

gaccess

Registered User.
Local time
Today, 16:06
Joined
Apr 17, 2011
Messages
32
I have a relatively simple DB that I need to date filter in a couple of reports.
I need to filter all, before a date, two months ahead. Currently in the report I right click date, choose date filters, select pop-up calendar, select the date I want and of course that works. Is there a more elegant way?
 
Last edited:

Red17

Registered User.
Local time
Today, 14:06
Joined
Sep 1, 2010
Messages
25
You can do this in a few ways:

Enter the folowing:
>=DateAdd("m",2,Date())
as a criteria in the date field of the query that is the report's datasource

OR

Enter the following into the Filter property for the report:
[Date_to_be_Filtered_On_Fieldname]>=DateAdd("m",2,Date())

and set the Filter On Load proerty for the report to "Yes".

The DateAdd("m",2,Date()) function adds 2 months to today's date.
 

gaccess

Registered User.
Local time
Today, 16:06
Joined
Apr 17, 2011
Messages
32
Thanks for your prompt reply. I have set the query up as per your reply (and it works of course) but I was hoping I might be able, on the report, to perhaps include a button (or something) that after viewing the entire list I could click to filter but when Ive done this the entire contents are filtered out. I can use the filter button to toggle back to show all but Im all out of ideas.

Where did I read
"give a man a code and he'll be frustrated for life" :)
 

gaccess

Registered User.
Local time
Today, 16:06
Joined
Apr 17, 2011
Messages
32
Ha I gave up too early, after dinner I sat down and had another play
The added button idea toggles (macro) your filter, just as I had hoped for:):)
Thanks again
 

Users who are viewing this thread

Top Bottom