Last Month

kesam

Registered User.
Local time
Today, 08:00
Joined
Aug 19, 2003
Messages
12
Users on the DB I've set up input a few different kinds of data. there's a form for items received, one for amendments, one for non conformities etc.

A report on each of these is produced for the previous month ie report presented in April is on March's figures.

I've set up the queries using BETWEEN[] AND[] which works fine but I have to input the parameter dates separately for each report.

Is there a way to get all reports for a specified month(drop down?) from a single button on a form?
------------------------------------------------------------------------
Seems the more I learn the less I know.

Kev
 
You need to create two columns in your query:

Column 1:
Month([Your date field])
Criteria: IIF(Month([Your date field])=1,12,Month([Your date field])-1)

Column 2:
Year([Your date field])
Criteria: IIF(Month([Your date field])=1,Year(Date())-1,Year(Date())
 

Users who are viewing this thread

Back
Top Bottom