duplicate entries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a field in a form named strMRNumber. I've got the No Duplicates
property set. However, I get a generic "can't save record because of
duplicate value" response. I'd like the user to have a more detailed
explanation of why they can not save the record. Is this possible?
 
Hi,



In the form Error event procedure, check the error code (first argument),
and if it correspond to the error you expect, supply the message and supply
the value acDataErrContinue to the second argument:


Private Sub Form_Error(DataErr As Integer, Response As Integer)
If 3022=DataErr then
MsgBox "Hi"
Response = acDataErrContinue
End If
End Sub




Hoping it may help,
Vanderghast, Access MVP
 
Back
Top