access 2003 reporting

S

support

I have converted a .mdb from Access 97 to Access 2003 &
Iam having problems bringing up a Prtint Preview with
this code 'DoCmd.OpenReport ReportName, A_PREVIEW'
causing error 2501 - 'The OpenReport action was canceled.'
Can this be resolved or does Access 2003 have a different
way of opening a Print Preview?
 
A

Allen Browne

The line should work (assuming that ReportName is a string variable), though
the constant A_PREVIEW was replaced by acViewPreview five versions ago.

If this still fails:
DoCmd.OpenReport "MyReport", acViewPreview
with error 2501, is there any chance that the NoData event is cancelling the
report due to the way it is filtered?
 

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