SkipForm(SaveChanges As Integer)

Application object (Verify)

Corresponds to selecting Form ð Skip in FORMS. The current form is skipped and Verify gets the next form. SaveChanges set to 0 causes Verify to discard any changes already made to the form. SaveChanges set to 1 causes Verify to save the form before getting the next one. No confirmation message box is displayed when this method is executed.

This method is useful in the FieldVerify, FormVerifyIdent, and FormVerifyUnident events.

Remarks

Only one form can be skipped at a time. If this method is called more than once from an event handler, all subsequent calls are ignored.

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.

In addition, when you call SkipForm in the FieldVerify event, the line immediately preceding the call (that is, the next-to-last line) must call SetReturnValue(0, "C").

Examples

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

Example 1 (does not work):

Function OnFormVerifyIdent ( ) As Long

    'add a condition of your choice 

    If <Your condition> = TRUE Then

        Application.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."

        Application.SkipForm(1)

        OnFormVerifyIdent = EV_OK_ABORT

    Else

        OnFormVerifyIdent = EV_OK

    End If

End Function

SkipField

SkipSet

Methods for the Application object for use with Verify