SirPoonga said:
I am using access 2k. If you noticed my post I said "msgbox command"
I know about the command. My main concern is sending something to
access via a short cut. I created a shortcut witht he follow porperty.
"C:\mydb.mdb" \cmd "option1"
Command return an empty string if I start this shortcut.
In addition to Doug's comment, please note that the /cmd option uses a
FORWARD slash, not a BACK slash. Here is the example from Access 2002 help:
Example
The following example shows how to launch Microsoft Access with a
command-line argument, and 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 code 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\Office10\Msaccess.exe" _
"C:\Program Files\Microsoft Office\Office10\Samples\Northwind.mdb" /cmd
"Orders"
Next, create a new module in the Northwind sample database and add the
following Sub procedure:
Public Sub CheckCommandLine()
' Check the value returned by Command function and display
' the appropriate form.
If Command = "Orders" Then
DoCmd.OpenForm "Orders"
ElseIf Command = "Employees" Then
DoCmd.OpenForm "Employees"
Else
Exit Sub
End If
End Sub
When you call this procedure, Microsoft Access will open the Orders form.
You can create an AutoExec macro to call this procedure automatically when
the database is opened.