I am wondering when is the best time to check for duplicate entries, Before or After Update on a control?
When I try to set the focus on a control in the form before update, I get an error message telling me that it is not possible and to do it After update (that is a poor paraphrase of the message). I wonder if somebody could explain the difference of the two.
Regards
John
If Not rs.NoMatch = True Then
MsgBox "Collection details for " & rs!FULLNAME & " for this month have already been entered", vbExclamation, "Duplicate Record!!"
Me.Undo
Forms![Monthly Contribution]!ParishonersID.SetFocus
Cancel = True
End If
When I try to set the focus on a control in the form before update, I get an error message telling me that it is not possible and to do it After update (that is a poor paraphrase of the message). I wonder if somebody could explain the difference of the two.
Regards
John
If Not rs.NoMatch = True Then
MsgBox "Collection details for " & rs!FULLNAME & " for this month have already been entered", vbExclamation, "Duplicate Record!!"
Me.Undo
Forms![Monthly Contribution]!ParishonersID.SetFocus
Cancel = True
End If