• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 703
  • Last Modified:

acViewPreview problem

I have this code:
DoCmd.OpenReport "Glassing Inspection Label", acViewNormal, , "[ID]=" & Me.ID

When it executes my report prints and the code that follows:
    Me.Undo
    DoCmd.Close

executes properly.

But...
If I change the acView to Preview,
DoCmd.OpenReport "Glassing Inspection Label", acViewPreview, , "[ID]=" & Me.ID
the report does not show on the screen and the
    Me.Undo
    DoCmd.Close

do not execute.

Any idea why?

Thanks
Brooks
0
gbnorton
Asked:
gbnorton
1 Solution
 
Rey Obrero (Capricorn1)Commented:
can you upload the db?
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Are you certain the Default printer is properly specified on the computer, and that you've set the Report to use the Default printer?

0
 
Jeffrey CoachmanMIS LiasonCommented:
What's the need for the me.Undo?
Remove that and see what happens.

Also it is not clear if your two code snippets are in the same sub, ...please clarify...

Can you post all the code as it appears in the module please?

Remember if you are opening the report in Print Preview, you are holding it open so you can view it.
If you closed it immediately after opening it, (Which is what your second snippet is doing) what's the point?
0
 
gbnortonAuthor Commented:
The reason for using Print Preview for troubleshooting data problems.  You were correct.  Removing the me.undo allowed the preview to stay up.

Thanks
Brooks
0
 
Jeffrey CoachmanMIS LiasonCommented:
;-)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now