Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Mar 2005
    Location
    Leicestershire, United Kingdom
    Posts
    505
    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. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 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"

  4. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,533
    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.

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

    Re: Schedule Access VBA (2000)

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

  6. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,533
    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.

  7. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 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
  •