Unanswered: Is it possible to capture command line params on open?
Hey guys. I'm wondering if it's possible to capture arguments passed when calling Access via the command line. If possible, I'd like to capture an argument and use it to automatically display a given report. The displaying the report part is easy, figuring out how to allow an external application to tell access WHICH report to display is proving a bit difficult.
It is possible to do this. I have not done it in some time, but basically I email out a shortcut that has some extra text on the end and then an autoexec partitions that and uses it as input commands.
The shortcut target is:
"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" W:\pathname\databasename.mdb /cmd Respond_to_matter579
The autoexec runs this function.
Dim Com, frm, cse As String
Com = Command
If Com = "" Then Exit Function
frm = Left(Com, 17)
cse = Right(Com, Len(Com) - 17)
If frm = "respond_to_defect" Then
DoCmd.OpenForm "respond_to_matter", , , , , , cse