Getting data from previous month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using A97 and I am creating a monthly reports that shows the
transactions for the month and how much was earned. One line of the report
needs data from the previous months. For example, the report is for the
month of April, and in the report totals, I need to show the sum earnings of
the previous months.

Any suggestions?

Thanks
 
dawnecia said:
I am using A97 and I am creating a monthly reports that shows the
transactions for the month and how much was earned. One line of the
report needs data from the previous months. For example, the report
is for the month of April, and in the report totals, I need to show
the sum earnings of the previous months.

Any suggestions?

Thanks

In a query against a table with a date field the following crieria will give
you all records from the previous month...


WHERE DateFieldName Between DateSerial(Year(Date()), Month(Date())-1, 1) And
DateSerial(Year(Date()), Month(Date()),0)

The above assumes that the date field contains no time component (midnight)
for all records. If time was captured as well as date then change the final
zero to a one.
 
Back
Top