I need help! Please MVP's, help me out

G

Guest

I've been posting the below all this week and no one's been able to help me
get things working. Please help, I need to get this working by Monday am in
order to deploy my app over via citrix .

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

Damon Heron

Would acViewNormal make a difference? I am not sure, but that is what help
says to use.

Damon
 
G

Guest

No, it didn't make any difference. Thanks for you response though. Do you
think the report could be corrupted and that is why it won't print?
 
G

Guest

Yes, as you can see from my original post I can open it in preview and print
it out using right click. It just won't print from the command button. Could
the form be corrupted?

Thanks.
 
G

Guest

Sorry I'm not an MVP but i'm willing to try and think here with you...

1. Have you tried copying your report and rename it to a new name and than
printing it.
2. Have you tried placing a new button on the form which just prints out
this report (al for testing purposes)
3. Are other reports printing as they should
4. Which printer is designated to the report (take a good look because you
can specify a specific printer per report) Report in design view - File
printproperties - rightclick on report for properties and look for weird
things

Let us know what you've come up with after checking the points above...

Maurice
5.
 
G

Guest

Thanks Maurce,

1. yes
2. yes
3. yes
4. I can't seem to find where to check for this property. I've looked in the
report properties and don't see where to designate a printer. I'm using
Access 2007, don't know if this makes a differnce. Exactly where would I find
out which printer is designated? Thanks, Rob
 
G

Guest

Ok, we've eliminated some pointers..

It's good to hear you are using 2007 (try mentioning this in your next
posts..).
If you want to find out which printer this specific report is designated to
do the following:

Place report in design view (or layout-view for that matter..)
If correct you should see the contextal tab "Report Layout Tool"
Choose "Page Setup" and check the settings there.

ok check and i'll check some more on my machine with 2007

Maurice
 
G

Guest

The printer is set up to the default printer which is what I want. I'm just
puzzled. Thanks for your help Maurice. Rob
 
G

Guest

Ok, another bites the dust.

In print preview try exporting it to Word (in the print preview ribbon on
the right)
Does this work?

Maurice
 
G

Guest

Maurice, strange thing. When I try to export it from the ribbon it see's the
report by a different name and save's it as a different object in my database
(form), but when I do a save as rtf it saves it ok. ??????? Thanks for your
persistence. Rob
 
G

Guest

Wait Maurice, I have the report as Modal, when I changed it I was able to
export it as an rtf, Could the modal thing be the problem?
 
G

Guest

Hmm, not that I know of but in that situation I always try everything so why
not try making it modeless. It would surprise me if that's what's causing the
trouble.
But just for testing sake... have you tried the option of exporting it to a
different DB -option can be found in the same ribbon as exporting to Word.

Have you tried debugging in immediate window to see the actual name of the
report

As a final option - sorry to say but i'm running out of options.. Have you
tried making a PDF of the report and tried printing that?

Maurice
 
G

Guest

Maurice, thanks so much for your outstanding effort. I'm just going to
rebuild the report and see what happens. Thanks again and in my opinion you
are a MVP.
Robert
 
G

Guest

Rob,

No problem, can you let me know if the new report you've created is printing
as you would like it to be. That way we can suggest other people to do just
that as a final solution.

Regards, Maurice
 
G

Guest

Yes Maurice, the report is now working properly. I tried opening a new report
and copying the entire non-working report to it. That didn't work, so I tried
copying all the sub reports to the blank report and they worked, then I
copied the report header to the new report and set the data source to the
underlying query and now the report works like I want it too.

Possible corruption with the old report is the culprit I presume. Again,
thanks for all your help. 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
Form Button won't print report 2
Report Doesn't Print 1
Syntax for number of copies to print? 1
Command button plus message 2
Print Button Code 2
Button Coding 1
Printing from a form 2

Top