Problem with Preview of Report

R

Robert Valentine

Group:

I have written an application that previews reports first and then allows
the user to print the report. My problem is that a few of my users have
reported that when they press the button to preview a report they get an
error. I have not been able to reproduce the problem on my computer so I
don't know how to fix the problem. Sometimes they can display one report,
but not another. I suspect that it must have something to do with their
display settings, but I'm not sure. Most of my users have no problem
previewing the reports. Has anyone else had this problem?

This is the VBA statement that I use to preview the reports.

DoCmd.OpenReport "Schedule01-Fed", acViewPreview
DoCmd.RunCommand acCmdZoom100

Any help will be greatly appreciated.

BobV
 
A

Allen Browne

Bob, you might need to find out what the error message says, so you know how
to address it.

For example, if the report contained no records, and you cancel the report's
NoData event, the procedure that contains the OpenReport statement will
generate error 2501. This is just Access letting your code know the report
did not open. Use error handling to trap and ignore that error.
 

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