• how to avoid open report action cancelled message (97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » how to avoid open report action cancelled message (97)

    Author
    Topic
    #361077

    how to avoid open report action cancelled message box
    what is a graceful way of avoiding the

    Viewing 0 reply threads
    Author
    Replies
    • #545037

      never mind, I commented this out next to the button running the report & peace & order was restored to the universe.

      ‘MsgBox err.Description

      • #545092

        FYI, you can also use: DoCmd.SetWarnings = FALSE

      • #545108

        You can also trap the error that occurs. This allows you to get a meaningfull error when something unexpected happens.

        eg surround your code in a procedure with the following.

        at start.
        On Error goto Error_trap

        {code in here)

        Exit_Procedure:
        Exit Sub
        Error_Trap:
        Select case err
        Case 2501’Report open canceled.
        ‘do nothing, we accept this error.
        Case Else
        msgbox Error,vbInformation,Err & “{procedure Name}”
        end select
        resume Exit_Procedure ‘Quit after error.
        This allows you to receive an error description in the msgbox and the error number for trapping if necessary and the procedure where the error occured as the title for the msgbox.

        Never blindly disable error trapping, as the ability to trap errors and deal with thenm is the primary advantage of using vba over macros.

    Viewing 0 reply threads
    Reply To: how to avoid open report action cancelled message (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: