Automated Monthly Report

  • Thread starter Thread starter Art...
  • Start date Start date
A

Art...

Can anyone explain, if they have succeeded in creating
one, how to create an Access/Excel object(s) that can
automatically generate a continuous monthly report(s)..?
 
Art... said:
Can anyone explain, if they have succeeded in creating
one, how to create an Access/Excel object(s) that can
automatically generate a continuous monthly report(s)..?

You need to automate the date criteria. Here are 2 date functions you will
need to produce a report for Last Month. Put them in a standard module:

Function BeginLastMonth() As Variant
BeginLastMonth = DateAdd("m", -1, DateSerial(Year(Date), Month(Date), 1))
End Function

Function EndOfLastMonth() As Variant
EndOfLastMonth = DateSerial(Year(Date), Month(Date), 0)
End Function

Now, in your criteria box of the query for your date report use the
expression:

Between BeginLastMonth() And EndOfLastMonth()

Each month the report will automatically get last month's data. As to when
it's run a batch file can start Access and run the report according to a
date/time set up in a scheduling program.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top