Hello,
I'm trying to trap error 3022, which occurs when you try to update a record with a duplicate value in an index. My code looks like this:
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo DupWorkOrder
Exit_Form:
Exit Sub
DupWorkOrder:
If Err.Number = 3022 Then
MsgBox...