Printing a report

  • Thread starter Thread starter Amateur
  • Start date Start date
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
 
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
 
Back
Top