M
Mike B in VT
I'm trying to use the Command function to pass a paramter into Access and it
isn't working. If the parameter is "auto" I want to call a macro to print a
bunch of reports, otherwise I want to display a form.
The Icon is setup as "S:\admin\excel queries.mdb" /cmd "auto"
I have in the only module, and have the AutoExec Macro call it:
Public Function CheckCommandLine()
' Check the value returned by Command function and display
' the appropriate form.
MsgBox Command() ' for debug purposes
If Command = "auto" Then
DoCmd.RunMacro "mcrPrintReports1"
Else
DoCmd.OpenForm "Form1"
End If
End Function
But the msgbox shows up empty and it always just runs the form.
Help!
isn't working. If the parameter is "auto" I want to call a macro to print a
bunch of reports, otherwise I want to display a form.
The Icon is setup as "S:\admin\excel queries.mdb" /cmd "auto"
I have in the only module, and have the AutoExec Macro call it:
Public Function CheckCommandLine()
' Check the value returned by Command function and display
' the appropriate form.
MsgBox Command() ' for debug purposes
If Command = "auto" Then
DoCmd.RunMacro "mcrPrintReports1"
Else
DoCmd.OpenForm "Form1"
End If
End Function
But the msgbox shows up empty and it always just runs the form.
Help!