Validation Rule?

  • In the BeforeUpdate event, you check the fields and issue a cancel i it fails your validation

    e.g.

    Private Sub Form_BeforeUpdate(Cancel As Integer)

    IF NZ(Me.txtDate,"") = "" then

    Msgbox "You must enter a date", vbCritical + vbokonly,"Validation Error"

    me.txtDate.Setfocus

    Cancel = True

    End If

    End Sub

Viewing post 1 (of 2 total)

You must be logged in to reply to this topic. Login to reply