Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    506
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Schedule Access VBA (2000)

    Hi,

    Looking at the options for scheduling VBA code within access.

    I have two lots of a vba that need to run at 06:00, 10:00, 14:00 & 18:00 everyday. I know the ontimer event is out of the window for this, but is there any other solutions?
    Best Regards,

    Luke

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Schedule Access VBA (2000)

    You might use scheduled tasks in Windows for this (Start | All Programs | Accessories | System Tools | Scheduled Tasks).

    You can create a macro in your database that calls the VBA functions that you want to run, then quits Access.
    You can let the scheduled task run a command line that opens the database in Access and runs the macro:

    "C:Program FilesMicrosoft OfficeOfficeMSAccess.exe" "CatabasesMyDatabase.mdb" /x "MyMacro"

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,538
    Thanks
    0
    Thanked 23 Times in 23 Posts

    Re: Schedule Access VBA (2000)

    I would have thought you could do this in the On Timer event of a form, I would like to know why it cannot.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Schedule Access VBA (2000)

    That's possible too, but it would require the database to remain open 24 hours a day.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,538
    Thanks
    0
    Thanked 23 Times in 23 Posts

    Re: Schedule Access VBA (2000)

    I did that for a steel maker years ago, the database was continuously open.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Schedule Access VBA (2000)

    In that case, using the OnTimer event of a form (which should also remain open all the time) would work OK.

Posting Permissions

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