Hi,
You can try something like this:
- Set you your key field's "after update" event:
Dim RecNum
'Lookup table to see if value exists
If DLookup("[KeyField]", "TableName", "[KeyField] = Me!TextboxName"

= True Then
MsgBox "Duplicate Key Entered", vbCritical, "Duplicate Value"
MsgBox "Going to existing Record!", vbOkOnly
'This requeries form and displays selected record
RecNum = Me!KeyField
Requery
Forms!FormName.RecordsetClone.FindFirst "FormName.KeyField = " & RecNum
Forms!FormName.Bookmark = Forms!FormName.RecordsetClone.Bookmark
Else
MsgBox "New Record.", vbOkOnly, "New Record Entered"
Me!KeyField.SetFocus
End If
Hope this helps,
jbehrne
If at first you don't succeed, call in an airstrike. - Murphy's Laws of Combat Operations