T
Tom
I got answer in a different thread...
here's the function:
Private Sub Form_Error(DataErr As Integer, Response As
Integer)
'This is a quick way to display the error number can trap
it.
'Uncomment the next line to display the error number.
'MsgBox DataErr
'Once the error number has been identified, you can
delete or
'comment out the Msgbox line of code above.
'Now, plug in the error number (e.g. 3022) in next line.
If DataErr = 3022 Then
MsgBox "Duplicate UniqueID - please enter unique
value!"
Response = acDataErrContinue
Me!UniqueID = Null
'The Null line of code is just a convenience, so the user
'can just start typing again immediately after closing the
'message box.
End If
End Sub
here's the function:
Private Sub Form_Error(DataErr As Integer, Response As
Integer)
'This is a quick way to display the error number can trap
it.
'Uncomment the next line to display the error number.
'MsgBox DataErr
'Once the error number has been identified, you can
delete or
'comment out the Msgbox line of code above.
'Now, plug in the error number (e.g. 3022) in next line.
If DataErr = 3022 Then
MsgBox "Duplicate UniqueID - please enter unique
value!"
Response = acDataErrContinue
Me!UniqueID = Null
'The Null line of code is just a convenience, so the user
'can just start typing again immediately after closing the
'message box.
End If
End Sub