Assuming I understand what that means (which is doubtful), no. I just got rid of the "Const" line in the code above and replaced "DataErr = conDuplicateKey" with "DataErr = 2113". I've read elsewhere that if you want a different message for each field, you can embed more than one "If ... End If" statement within the main one. Here's what I copied from the website (I'm afraid I didn't make a note of the source):
Code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
If DataErr = 2113 Then 'Data entered doesn't match datatype
If Screen.ActiveControl.name = "txtAmount" Then
Response = MsgBox("Data For Amount Field Must Be Entered in Currency Format!", vbExclamation, "Data is Not in Currency Format")
Response = acDataErrContinue
End If
If Screen.ActiveControl.name = "txtDate" Then
Response = MsgBox("Field Must Be a Valid Date!", vbExclamation, "Data is Not a Valid Date")
Response = acDataErrContinue
End If
End If
End Sub