Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Feb 2001
    Youngstown, Ohio, USA
    Thanked 0 Times in 0 Posts

    Command Line Options

    I need a list of different command line options usable with Access 2000. My goal is to have a DOS batch file issue the command to start Access, open a specified file, and execute a non-autoexec macro (which, when it is done its work, would quit Access and return control to the DOS batch file.)

    I know I can use the filename as a command line argument, but I don't know if it is possible to execute a specific macro from the same command line. The DOS batch file is to be used to update the database after hours, as a scheduled item. I could set up an autoexec macro within the database to accomplish the update, but that would cause it to run every time the database is opened, and that is something that I do not want. (The update would occur weekly, but the database may be accessed daily.)

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Indianapolis, Indiana, USA
    Thanked 0 Times in 0 Posts

    Re: Command Line Options

    Hi David,

    You can start access with the switch:
    <pre>/x macroname</pre>

    So the command you could use would be something like:
    <pre>C:Program FilesMicrosoft OfficeOfficeMsaccess.EXE C:My DocumentsMyDatabase.MDB /x UpdateMacro</pre>

    This will run the specified macro. Another thought instead of using batch files is to set the built-in Windows Scheduling Agent to run the commandline at the desired interval.
    Hope this helps....

Posting Permissions

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