D
Dale Fye
I have some reports in another Access database that I want to be able to run
and display from within my current database. This second database is linked
to the same datasource as the first.
So far, I've not been able to come up with anything other than to Shell to
that database, pass it some command line parameters, and add some code to
that db to interpret the parameters and then open the report I want. I've
figured out how to open the db using shell command, but cannot figure out the
correct syntax to pass command line parameters). Basically, I've got:
strProgram = chr$(34) & "C:\Program Files\....\MSAccess.exe " & chr$(34)
strFileName = chr$(34) & " C:\MyProgram.mdb"
strCmdLine = chr$(34) & " cmd/ This is a test" & chr$(34)
Shell(strProgram & strFileName) 'This works to open Access to the specified
mdb
Shell(strProgram & strFileName & strCmdLine)
'This generates an error :The command line you used to start Microsoft
Access contains an option that Microsoft Access doesn't recognize.
Any ideas about how to format strCmdLine to get it to run would be greatly
appreciated.
and display from within my current database. This second database is linked
to the same datasource as the first.
So far, I've not been able to come up with anything other than to Shell to
that database, pass it some command line parameters, and add some code to
that db to interpret the parameters and then open the report I want. I've
figured out how to open the db using shell command, but cannot figure out the
correct syntax to pass command line parameters). Basically, I've got:
strProgram = chr$(34) & "C:\Program Files\....\MSAccess.exe " & chr$(34)
strFileName = chr$(34) & " C:\MyProgram.mdb"
strCmdLine = chr$(34) & " cmd/ This is a test" & chr$(34)
Shell(strProgram & strFileName) 'This works to open Access to the specified
mdb
Shell(strProgram & strFileName & strCmdLine)
'This generates an error :The command line you used to start Microsoft
Access contains an option that Microsoft Access doesn't recognize.
Any ideas about how to format strCmdLine to get it to run would be greatly
appreciated.