Selection of records from past 6 months

bennybee

Registered User.
Local time
Today, 00:16
Joined
Jan 13, 2004
Messages
50
I am trying to get my database to return records for the last 6 months.

Its a database that stores record information for venues that hold functions, that are variations of their normal trading conditions (eg. holding a party that is outisde thier normal trading hours).

I am trying to set up a query that will only return records that are in the last 6 months (ie. the 6 months just gone from todays date), however im having no luck.

It has to be a dynamic query that will 'shift' the 6 month block forward one day as each day passes.
ie. Date 6 months previous from today would be July 16th (for example), but tomorrow the date 6 months ago would be July 17th.). so i think that it has to incorporate the =Now() function, so that the subsequent report created on the query is current for the day that the query is run.

if someone could please give me some guidance on how to start my query so that it only displays records current to the last 6 months, it would be fantastic.

thanks alot
BB
 
BB,

Look at the DateAdd function. You can use it in the query that
feeds your report. In the criteria section for the date field
put:

> DateAdd("m", -6, [YourDateField])

Don't know the exact syntax but Help will have an example.

Wayne
 

Users who are viewing this thread

Back
Top Bottom