Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2001

    Unanswered: command line arguments

    how to pass command line arguments to a ms access application

  2. #2
    Join Date
    Nov 2001
    This is what I found in MS Access Help:

    /cmd Specifies that what follows on the command line is the value that will be returned by the Command function. This option must be the last option on the command line. You can use a semicolon ( as an alternative to /cmd.

    Command Function Example

    The following example shows how to launch Microsoft Access with a command-line argument, then shows how to return the value of this argument by using the Command function.

    To test this example, click the Windows Start button and click Run. Type the following in the Run dialog box, on a single line. (You must surround the parts of the command line information in quotation marks).

    "C:\Program Files\Microsoft Office\Office\Msaccess.exe" _
    "C:\Program Files\Microsoft Office\Office\Samples\Northwind.mdb" _
    /cmd "Orders"
    Next, open a new module in the Northwind sample database and add the following function.

    Function CheckCommandLine()
    ' Check value returned by Command function.
    If Command = "Orders" Then
    DoCmd.OpenForm "Orders"
    ElseIf Command = "Employees" Then
    DoCmd.OpenForm "Employees"
    Exit Function
    End If
    End Function

Posting Permissions

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