Avatar of mjbdbase

asked on 

Validate field values before leaving record


I have 2 fields and would like to not let the user leave the record, nor save it if the field values aren't equal.

I would like to have a message box tell them they can't leave until they both enter or otherwise the record will not be saved.

I am using Access 2003 with Windows xp

Many thanks in advance
Private Sub DelaysMinutesfromDelays_AfterUpdate()
    If [DelaysMinutesfromDelays] < [Minutes of Delays] Then
            MsgBox "Warning: Both fields need to equal " & _
            "please re-enter you delays."
    End If
End Sub

Open in new window

Microsoft Access

Avatar of undefined
Last Comment

8/22/2022 - Mon