Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2002

    Question Unanswered: Running a macro daily automated

    Is there a way besides writing code in VB 6 or .net and using the task scheduler to execute it every day when noone is on the database to run a bunch of code to go through one or more tables and change info based on certain criteria? I am the author of this replicated db at my work and using ADODB like I am to go through tables and do this gives locking errors when more than one person is on, even with adlockoptimistic set. What I want to do involves updating tracking info like weeks at a vendor based on current date and in date and priority for getting done at that vendor based on desired out date. If anyone has a way of just doing this with a macro, your help would be appreciated, as would any code that could do this using straight VB. I can't seem to find a way using the task scheduler to do anything but run a program. I've tried a program called macro express but it seems to have problems sometimes. Thank your for your time and help.

  2. #2
    Join Date
    Aug 2003

    Re: Running a macro daily automated

    Did you try to start Access some time during the night from the task scheduler with the appropriate command line options:

    Msaccess.exe MyDatabase /x MyMacro

    In the macro you can just use the RunCode command to run any Sub that does what ever is needed and then closes the database. I use this system to compact a couple of databases once a week.

Posting Permissions

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