On Wed, 1 Mar 2006 17:20:11 -0500, Keith wrote:
[Quoted Text] > I have an Access 2000 db with a front end / back end design. All users have > Win2K or WinXP sp2. Database has been running fine for at least a year > (bought the XP machines in Nov 2004). Now on ONE machine ONLY, a > DoCmd.OpenReport command throws an error. My code looks like: > > on error resume next > docmd.openreport ... > if err then ... > > When I step through the program on that machine, the docmd.openreport > generates an error with err.description = "The OpenReport command was > cancelled" > > It makes no sense to me. Could someone help point me in a direction to try? > Or should I just reinstall Access? > > Thanks, > Keith
That's probably error #2501. Your report may have a Cancel = True in the OnNoData event which has fired because your report has no data. If this is so, then simply change your command button code to:
On Error GoTo Err_Handler DoCmd.OpenReport etc.... Exit_Sub: Exit Sub Err_Handler: If Err = 2501 Then Else MsgBox "Error #: " & Err.Number & " " & Err.Description End If Resume Exit_Sub
-- Fred Please respond only to this newsgroup. I do not reply to personal e-mail
|