Form Button won't print report

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."

I guess, for this particular report, I need to tell it to send the report to
the default printer. But I can't figure out how to do this.

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
Debug.Print

Exit_cmdPrintCaseReport_Click:
Exit Sub

Err_cmdPrintCaseReport_Click:
MsgBox Err.Description
Resume Exit_cmdPrintCaseReport_Click

End Sub
 
G

Guest

1. What is the Debug.Print for? and Debug.Print what? I'd remove the line or
comment it out.

2. Based on the error message, do you have any printers defined under your
user account in your citrix environment??? And even if you do, do you have
the proper permissions? Try printing from word and see what happens.
 
G

Guest

I've taken out the Debug.Print. I do have the proper permissions in Citrix.
As I said other reports print fine. The problem also happens on my home
computer, so it is not specific to Citrix. Do you have any other ideas?

Thanks, Rob
 

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

Can't get report to print 5
I need help! Please MVP's, help me out 16
Report Doesn't Print 1
Syntax for number of copies to print? 1
Print Button Code 2
Command button plus message 2
Button Coding 1
Command Button 1

Top