copy this code into the before update of your ingredient name, change the
spelling of IngredientName if nessesary
------------------------------------------------------------------------------
-------
Private Sub IngredientName_BeforeUpdate(Cancel As Integer)
Dim SID As String
Dim stLinkCriteria As String
Dim rsc As DAO.Recordset
Set rsc = Me.RecordsetClone
SID = Me.IngredientName.Value
stLinkCriteria = "[IngredientName]=" & "'" & SID & "'"
If DCount("[IngredientName]", "[table name where IngredientName exists]",
stLinkCriteria) > 0 Then
Me.Undo
MsgBox "WARNING " _
& SID & " Already Exists." _
& vbCr & vbCr & "You will now be taken there.", vbInformation _
, "Duplicate Information"
rsc.FindFirst stLinkCriteria
Me.Bookmark = rsc.Bookmark
End If
Set rsc = Nothing
End Sub
------------------------------------------------------------------------------
---------------------------------
Hope this helps!!
On a form ( ID field hidden) I wish to have the second field (ie Ingredient
Name) check and see if it already exists. If it does then display the record
for editing. If not then continue to fill out form. I've tried various things
but fairly new so a few clues would be great! Eric