access 2003 reporting

  • Thread starter Thread starter support
  • Start date Start date
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?
 
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?
 
Back
Top