Google Answers Logo
View Question
 
Q: Access Printing Problem - Hammer? ( No Answer,   3 Comments )
Question  
Subject: Access Printing Problem - Hammer?
Category: Computers > Programming
Asked by: bselltiz-ga
List Price: $10.00
Posted: 26 Aug 2003 15:47 PDT
Expires: 18 Sep 2003 05:55 PDT
Question ID: 249045
I am printing a report to a label printer for labeling inventory. The
exact code is:
        DoCmd.OpenReport strReportName, acViewPreview, , strDataFilter
        
        If lngPrintCount > 0 Then
            DoCmd.PrintOut acPrintAll, , , , lngPrintCount
            DoCmd.Close acReport, strReportName
        End If

The problem is that the first label keeps coming out blank. The weird
thing is that if I put a break in the code at the first line and then
click the run button then the first label prints properly although I
have done nothing different other than stopping the code. I have tried
running a loop to slow things down, tried to repaint the object
(report) - nothing seems to work.
The entire process happening before the print is a bit involved and I
would rather not have to get into it here. I can tell you that it is a
Dymo label writer 330 printer and that I am setting the printer by
opening the report hidden first, then setting any report properties I
need then reopening the report using the code above.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Access Printing Problem - Hammer?
From: hammer-ga on 27 Aug 2003 03:58 PDT
 
Hi Brian,

I'm afraid I  don't have this label printer, so I can't set up a
testbed to see what it's waiting for. Perhaps one of the other
Researchers can help you out.

- Hammer
Subject: Re: Access Printing Problem - Hammer?
From: bselltiz-ga on 27 Aug 2003 12:26 PDT
 
Hey Hammer,
I don't think the label printer is the issue. I'm thinking this would
be more of a known access problem when printing. The key is that if I
stop the code at the line after opening the report, then click run,
without doing anything else, then everything works fine.
Brian
Subject: Re: Access Printing Problem - Hammer?
From: anonytmouse-ga on 29 Aug 2003 20:40 PDT
 
Try putting a DoEvents statement in where you break.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy