Printing a report

A

Amateur

Dear Sirs
I have a form with a command button which should preview a report from
another database.
I use the following code:
**************
Private Sub Imprimircomsiones_Click()
DoCmd.OpenReport "c:\cps208\sales\salespersonalcommission",
acViewPreview, "", "", acDialog

End Sub
**************
Can someone tell me where my mistake is laying?
Thanks
Klaus
 
A

Amateur

Hi Wayne

I have the following cde for my button:
*******************
Private Sub preview_Click()
Call Shell("""C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE""
""C:\cps208\sales.mdb""/Xpreviewcommission ", 1)
End Sub
********************
I created a Macro in the "sales.mdb" - Echo, setwarnings,OpenReport,Quit.
OpenReport I put in Preview mode.
If I push my command button the Db "sales" comes up - is doing nothing - and
close again.
What am I doing wrong? I just would like to see a preview from the report
before printing.

Thanks
Klaus
 

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

Report Preview 3
Back-up DB's 2
Printing a form (Continuation) 0
Report printing 3
Previewing a report 3
setting values to "0" 3
Images in a form 1
Opening a Form from a different database 9

Top