Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print a report every hour automatically

    I know this has been discussed before but a search on this topic produced no results.. Sooo.. I would like to have my Access 97 database print a report every hour automatically.. Apparently the users find it hard to push a button once an hour.. Can this be done without using the windows scheduler? Thanks..

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a report every hour automatically

    Hi Gary,

    I can't remember the upper limit on the timer function, but you could have a form open (and perhaps hidden) with a timer event triggering a print command every hour...Just a thought <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a report every hour automatically

    Hey Mark.. I messed with that a little.. I had it printing every 10 minutes or so.. Would you know how to make it print at a certain time.. Like 9:30.. I got this code from another post but it keeps failing (Run time error 13 type mismatch.. I used this on the ON timer event and set the Time interval to run every mintue but it failed..
    From what I gather it should check the time see if it's 8:00 if it is it print the report.. Don't know why it failed though..

    If Format(Time(), "hh") = 8 Then
    docmd.openreport "ReportName",acNormal,"",""
    else
    exit sub

  4. #4
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    London, Ontario, Canada
    Posts
    437
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a report every hour automatically

    In theory it looks just fine. I'm not sure what the quotes are after acNormal, but if you have no criteria try it without, i.e docmd.openreport "ReportName",acNormal One other thing, if you want to print on the hour Format(Time(),"nn") and test for 0 to print at 08:00, 09:00 etc.

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a report every hour automatically

    Why is the Windows Scheduler not an option?

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a report every hour automatically

    I've experimented with the windows scheduler and it does work well but my users are completely clueless.. The whine and complain if the have to do anything.. I made a batch file that the user needs to run to update the database to a new version and they compalin about that.. I mean it is tough to type r:system.bat and the run command.. Sorry just venting.. But to use Scheduler I would have to go to each users pc about 30 and set the appointments.. Unless there is another way?

  7. #7
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Print a report every hour automatically

    Are you saying that each user has to run a report every hour?

    At my place of employment, I have a separate PC that all it does it run jobs. I use WSH & VBScripts and put them in the scheduler. We have scripts that fire up Excel, generate some charts, and E-mail when it's done. I haven't done any VBScripts with Access but I'd be willing to bet that it's possible. You could write the script to E-mail the report or better yet publish the report to a web. I don't know all the details of your situation, so this is just my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>

Posting Permissions

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