Command line to open Access report directly from Windows Run comma

A

APath

I would like to know if anyone has the knowledge and command line syntax to
open a MS Access (2003) report directly from the run command line. I would
like to use this command line to access a report directly from another
application without having to launch the switchboard and make the report
selection from there. They would select an embedded shortcut pointing
directly to this report in the access database and the command line would
execute in the background linking to the seleted report object. Thanks to
anyone that can assist.
 
D

Dirk Goldgar

APath said:
I would like to know if anyone has the knowledge and command line syntax to
open a MS Access (2003) report directly from the run command line. I
would
like to use this command line to access a report directly from another
application without having to launch the switchboard and make the report
selection from there. They would select an embedded shortcut pointing
directly to this report in the access database and the command line would
execute in the background linking to the seleted report object. Thanks to
anyone that can assist.


If you're interested (and if it suits your purposes), it's possible to
create a shortcut directly to an Access report object. You can drag the
report object from the Access container window and drop it directly on the
desktop, for example, to create a shortcut (.MAR file) to the report in the
database.

If that doesn't work for you, you can also create a macro in the database
that uses the OpenReport action to open the report. Then you can use the /X
command-line argument when opening the database with Access, to execute the
macro. The full command line might be something like (for example):

"C:\Program Files\Microsoft Office\Office11\MSAccess.exe"
"C:\Users\Dirk\Documents\MyDatabase.mdb" /x OpenMyReport
 
D

Dale Fye

Dirk,

In over 10 year using Access, this is the first time I have ever heard about
the .Mar file or being able to drag a report to the desktop.

I'm not sure how I would use this knowledge, but it will probably come in
handy some day.

Thanks
 
D

Dirk Goldgar

Dale Fye said:
Dirk,

In over 10 year using Access, this is the first time I have ever heard
about the .Mar file or being able to drag a report to the desktop.

I'm not sure how I would use this knowledge, but it will probably come in
handy some day.

Thanks


You're welcome. The shortcut will open Access, the target database, and the
report in one go. You can do the same thing with a form, creating a .MAF
file by dragging and dropping. I actually had a use for that once; I've
never had a use for the report shortcut.
 
S

shahzad s

Hi,
Is it possible to pass a report parameter via the shortcut created in this manneer?

Regards
Shahzad
 
L

Larry Daugherty

Thanks Chris. My offline reader settings truncated the display of the
question short of "Run Command" & when opened I just read the
contents. Mea culpa.

Apologies to Shahzad for any confusion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top