OutputTo Error in A2007

G

Guest

I have a function on my Ribbon to send the active report to Snapshot.

DoCmd.OutputTo acOutputReport, "", "SnapshotFormat(*.snp)", "", False, "",
0, _
acExportQualityPrint

This works fine when I open with ShiftKey to test, but returns an error when
opening the DB without the shifkey.

Error 2487 - The object type argument for the action is blank or invalid.

Any suggestions will be appreciated.
 
T

Tom Ventouris

Resolved.

it seems A2007 will not output the active report when the report name is
left balnk, like earlier versions. I used Screen.ActiveReport.Name to do the
job:

DoCmd.OutputTo acOutputReport, Screen.ActiveReport.Name,
"SnapshotFormat(*.snp)", "", False, "", 0, acExportQualityPrint
 

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

Similar Threads

OutputTo PDF error 2501 The OutputTo action was cancelled 1
Error on OutputTo 1
Error 2024 3
outputto excel error 4
DoCmd OutputTo Error 5
DoCmd.OutputTo Crashes Access 2007 0
Help with Code 1
OutputTo pdf error 1

Top