Automatically run code at given time.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Matt Kisasonak (anonymous_at_discussions.microsoft.com)
Date: 02/18/04


Date: Wed, 18 Feb 2004 06:33:06 -0800

If you have a form open around 5pm, you can use the On
Timer event of the form. Set the Timer Interval to a
minute (60,000 milliseconds) and check if the Time() is
5:00 and if so, run the code.

>-----Original Message-----
>I have a function that outputs a query to excel. I run
>this code every day. Currently I have to hit a command
>button to run the code. I am looking for a way to have
>the database do this automatically at 5PM. The output
>code is: DoCmd.OutputTo
>acOutputQuery, "qryOpenPBConPriorityCountCrosstab",
>acFormatXLS, "P:\Phil Hull\PBContractorOpenItemCount", -1
>The database is on a server and I would like it to
>automatically run this code at 5PM. I would appreciate
>your help with the automation code.
>Thanks, Mike
>.
>



Relevant Pages

  • Automatically run code at given time.
    ... Create a windows task opening the database using a command ... >Timer event of the form. ... >>your help with the automation code. ...
    (microsoft.public.access.modulesdaovba)
  • Re: A more difficult scheduling question
    ... Create a form in your ACCESS database. ... Call it frmScheduler. ... (This will make your timer event run every 2 minutes.) ... open an ACCESS database that has an AutoExec macro that runs ...
    (microsoft.public.access.macros)
  • Re: Importing files when updated automatically.
    ... > I have created a database which, amongst many other things, imports ... Can you count on the database to be open at whatever time the import ... you could use the Timer event of a form ... external scheduler routine to open the database, and if you do that, the ...
    (microsoft.public.access.modulesdaovba)
  • Re: VSS Automation - Creating New Project
    ... By "top level" I meant at the uppermost project level, ... Using the automation interface, I open the ... In the MSDN article "Microsoft Visual SourceSafe OLE Automation" ... there is a section about the database Open ...
    (microsoft.public.vstudio.sourcesafe)
  • Re: Word AUtomation
    ... "TonySper" wrote in message ... I am using the automation as below" ... > *This is what is in the database lastid.lscript2 ... > oWORD = GetObject ...
    (microsoft.public.fox.programmer.exchange)