Results 1 to 2 of 2
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    On No data (Access 2000)

    In my report i have the following code :
    MsgBox "Report not available", vbInformation, "Warning!"
    Cancel = True
    DoCmd.SetWarnings False
    Exit Sub
    When no data available i get the following message : " The Openreport action was cancelled " with 2 options Ok and debug. If ones presses debug one gows into the code itself.May i have the mesage without the debug option?

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: On No data (Access 2000)

    add an error handler to the command that opens the report.


    Err_cmdOpenReport_Click:
    If Err.Number = 2501 Then
    Resume Exit_cmdOpenReport_Click
    Else
    MsgBox Err.Description
    Resume Exit_cmdOpenReport_Click
    End If

    the message you see relates to error 2501 so with this handler, you won't see it at all.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •