Results 1 to 14 of 14
  1. #1
    Join Date
    May 2006
    Posts
    5

    Unanswered: Share Acces reports

    I have several ms access reports which I run daily and then send out to my employees.
    Can I automate this time consuming task and have it stored to a network drive?

    thanks

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    You can export reports as PDFs and then save them to a network drive.
    Me.Geek = True

  3. #3
    Join Date
    May 2006
    Posts
    5
    converting to pdf still means running them manually

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    Not if you call the code in a single OnClick event or something (which you'd have to do anyways). You just automate it to do multiple reports instead of one.
    Me.Geek = True

  5. #5
    Join Date
    May 2006
    Posts
    5
    ideally i would like to have the reports run before coming into the office.I was thinking of using windows scheduler, and some kind of vb script

  6. #6
    Join Date
    May 2005
    Posts
    1,191
    I have never really relied on windows scheduler, but I know it's been done before. Google it, you're sure to find help.

    As for running the reports, look at the docmd.openreport method, and then use the code I linked to earlier to get it into PDF.

    I don't know how long it takes these reports to run or how often you need to run them, but sometimes I'll just run some large reports as I go home and then check them the next morning.
    Me.Geek = True

  7. #7
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    I have a lot of reports that run automatically and then email out a PDF report. Typically what I do is create a macro named AutoExec because whenever you open the database Access will automatically run the AutoExec macro. The macro just calls up some code that runs the report like nckdryr mentioned. Then I use Windows Scheduler to fire off the db everyday at a set time.

    Post back if you need any help getting it going.

    C

  8. #8
    Join Date
    May 2005
    Posts
    1,191
    Quote Originally Posted by canupus
    I have a lot of reports that run automatically and then email out a PDF report. Typically what I do is create a macro named AutoExec because whenever you open the database Access will automatically run the AutoExec macro. The macro just calls up some code that runs the report like nckdryr mentioned. Then I use Windows Scheduler to fire off the db everyday at a set time.

    Post back if you need any help getting it going.

    C
    Agree for the most part, but I would caution against using macros if there is for anything but your own personal use. As someone who has had to come behind and work on a project that uses macros (as well as someone who has developed from scratch), it is my personal opinion that Access macros are 10 shades of suck. Always use code, never macros.
    Me.Geek = True

  9. #9
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Easy stuff. Just make a database that's sole purpose in life is to print those reports you want automatically on startup (as PDF or auto-emailed) and then automatically close.

    Then call this database up in the Windows Task Scheduler every day at like 4am.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  10. #10
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by p@rick
    ideally i would like to have the reports run before coming into the office.I was thinking of using windows scheduler, and some kind of vb script
    assuming you have a microsoft computer running overnight which has access on you can happily use windows scheduler to do what you want, especially somethign as trivial as reporting.

    you need to wake up Access using a command line invocation.. can be from a bit of VBS, it can be from a good old DOS batch command line..

    you need to call access and supply it with the appropriate mdb/ mde name and a macro or function which will call all your reports.

    bear in mind you may struggle to save things like filenames in PDF writers.. the problem is that all your code must run without keyboard interevention.. so that means you need to make sure your design handles all that.

    personally I have never used Access for batch reporting, I've used it for overnight data extraction, query manipulation and housekeeping, but never for reporting so cannot guarantee it will do what you want.

    you may need to save the report as a snapshot.
    I'd rather be riding on the Tiger 800 or the Norton

  11. #11
    Join Date
    May 2006
    Posts
    5
    Some help creating the autoexex macro would be greatfully appreciated. thanks

  12. #12
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you don't need to create an autoexec macro
    you jsut need to create a macro

    an autoexec macro is one that always starts when that application is laoded. which from you have said so far isn't waht you want at all...

    ms access create a macro - Google Search
    I'd rather be riding on the Tiger 800 or the Norton

  13. #13
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You will need an AutoExec macro or the Startup dialog to get the database to do anything when it is opened, so I would argue that you DO need it.

    Just call the macro "AutoExec" and it will execute when the database is opened. In it, print the reports and quit.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  14. #14
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by StarTrekker
    You will need an AutoExec macro or the Startup dialog to get the database to do anything when it is opened, so I would argue that you DO need it.

    Just call the macro "AutoExec" and it will execute when the database is opened. In it, print the reports and quit.

    if this db is only ever used for overnoght reporting purposes then I'd agree with you. if this db is used for other purposes aswell then you don't need to create a macro called 'autoexec'. you cna call the macro anyythign you like and tell access which macro to use when invoking the instance of Access by using the appropriate command line switch (IIRC its /x macroname).

    if you make it an autoexec macro then it will always start when the mdb is opened, if you call it something else it the amcro will only run when you explicitly tell it to run. I find the difference quite usefull. you can then also have an autoexec macro that says soething to the effect.. this application is used for overnight processing, but don't doesn't runt he overnight process. so nothing is done out of sequence. another advantage of not using the macro as "autoexec" is that you can open the mdb up without having to remember to bypass the macro when you don't intend using the autoexec macro.. say when developing, doing housekeeping and so on.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •