Can't get report to print

G

Guest

I have a command button on a form "Print Case Report" that won't print
the report. It appears to go to the printer as I can see momenentarily the
little "printing pages 1-6", but then noting prints out. It will print if I
open it in print preview and right click on it and then click on print. I
don't understand this.

Another on of my reports prints just fine with the cmd button on the form. I
have the app deployed over Citrix and I get the message "You must install a
printer."

An aside, is it possible to embed a print command in the preview view's
report bar where the report caption shows up?


Any help is greatly appreciated. Here's the code behind the button. Thanks,
Rob


Private Sub cmdPrintCaseReport_Click()
On Error GoTo Err_cmdPrintCaseReport_Click

Dim stDocName As String

stDocName = "rptCaseReport"
DoCmd.OpenReport stDocName, acNormal


Exit_cmdPrintCaseReport_Click:
Exit Sub

Err_cmdPrintCaseReport_Click:
MsgBox Err.Description
Resume Exit_cmdPrintCaseReport_Click

End Sub
 
P

Powderfinger

Open up the report in design view. Select File/Page Setup from the main
menu. Click the Page tab and make sure the correct printer is selected.
 
G

Guest

Thanks for the reply. As I said in the post, it will print if I right click
on the report in preview view. It needs to go to the default printer. Any
other ideas,

Thanks Rob
 
P

Powderfinger

How did you get the report in Print Preview? Did you use the button or
through the database window.

I would change the DoCmd.OpenReport line to:

DoCmd.OpenReport stDocName, acViewPreview

To see if you can get it to open in print preview with that button.

If you have already done this , try changing the line to this:

DoCmd.OpenReport stDocName, acViewNormal

Just a hunch.
 
G

Guest

I've done all that as you can see from the original post. I can open it
preview and print it out using right click and selecting the print icon. It
just won't print using acViewNorma
 

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