SkipForm Example

Below are two examples, one which works and one which does not work, in order to show how to use SkipForm.

Important note: The SkipForm method only works correctly if you use the method in the very last line of code in your event handler (except the return value line). You must not execute anything else after this method in your event handler.

 

Example 1 (does not work):

Function OnFormVerifyIdent ( ) As Long

    'add a condition of your choice

    If <Your condition> = TRUE Then

        VerifyApp.SkipForm(1)

        'Notify user

        MsgBox "Skipping this form."

        OnFormVerifyIdent = EV_OK_ABORT

    Else

        OnFormVerifyIdent = EV_OK

    End If

End Function

 

Example 2 (correct):

Function OnFormVerifyIdent ( ) As Long

    'add a condition of your choice

    If <Your condition> = TRUE Then

        'Notify user

        MsgBox "Skipping this form."

        VerifyApp.SkipForm(1)

        OnFormVerifyIdent = EV_OK_ABORT

    Else

        OnFormVerifyIdent = EV_OK

    End If

End Function