Open Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to be able to open a report in another access database.

Can somebody tell me the best way to open a connection to a database and
call a certain report.
 
Stefan,

You mean print a report? You could make a macro in the other database
with an OpenReport action to print the report, and then in your active
database you could use a macro with a RunApp action, with Command Line
argument something like this...
"C:\PathToAccess\Msaccess.exe" "C:\YourFolder\AnotherDB.mdb" /x
ReportMacro

Not sure about "best way" though. Another approach would be to copy the
report into the active database, and link to the tables in the other
database that the report is based on, and then just run the report
locally whenever you want.
 
I think your solution will work good. However I haven't been able to get the
syntax right. Can you please help. I tried to you copy your code this is
what I have

"C:\Program Files\Microsoft Office\OFFICE11\Msaccess.exe"
"D:\EUsers\reports\My Documents\Access Reports\Balance Center.mdb"
/mcr_OpenPatientAging

I get this error

The command line you used to start microsoft office access contains options
microsoft office access doesn't recongize.
 
Stefan,

/x is the "run macro" switch. Try it like this...
"C:\Program Files\Microsoft Office\OFFICE11\Msaccess.exe"
"D:\EUsers\reports\My Documents\Access Reports\Balance Center.mdb" /x
mcr_OpenPatientAging
 
Worked perfectly!


--
Thanks
Stefan


Steve Schapel said:
Stefan,

/x is the "run macro" switch. Try it like this...
"C:\Program Files\Microsoft Office\OFFICE11\Msaccess.exe"
"D:\EUsers\reports\My Documents\Access Reports\Balance Center.mdb" /x
mcr_OpenPatientAging
 
Back
Top