Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Automated Monthly Report

0 views
Skip to first unread message

Art...

unread,
Feb 6, 2004, 3:20:18 PM2/6/04
to
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...

unread,
Feb 6, 2004, 3:22:40 PM2/6/04
to

anon...@discussions.microsoft.com

unread,
Feb 6, 2004, 4:01:32 PM2/6/04
to
you can run the scheduler in your operating system or use
DOS commands to automate
>.
>

Arvin Meyer

unread,
Feb 6, 2004, 8:25:26 PM2/6/04
to
"Art..." <anon...@discussions.microsoft.com> wrote in message
news:c1b301c3ecee$f8418180$a601...@phx.gbl...

> 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


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.576 / Virus Database: 365 - Release Date: 1/30/2004


0 new messages