Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scheduled update (2002)

    I need to schedule an automated update to an Access database. Ideally, I

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scheduled update (2002)

    I have used the Windows Scheduler on several occasions to run daily events. I set the database properties to open a specified form upon startup. Then I create a command button that executes the required function. Upon completing the function, I add a Quit command to exit from Access. This gives me a method to run the function manually during debugging.

    Then I add a timer to the form and fire it every second. At each timer event, I decrement a textbox by 1. The default value of the textbox is set to about 15. When it reaches zero, I fire the command button's Click event to execute the function -- same as clicking the button manually.

    By setting the default value of the textbox to 15, this provides a 15 second delay before the automatic process is executed. I add a second command button that stops the timer event from firing, thus providing a way to interrupt the automatic countdown.

    Final step is to configure the task scheduler to launch the database at the appropriate time. You could create several tasks to launch the program several times per day (not sure whether you can copy 'n paste tasks, but it's worth a try for cloning them).
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  3. #3
    2 Star Lounger
    Join Date
    Feb 2003
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Scheduled update (2002)

    Thanks for the tip. That should accomplish exactly what I need.

Posting Permissions

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