View Single Post
  #1  
Old April 28th, 2004, 03:00 PM
Curt
external usenet poster
 
Posts: n/a
Default Consistant error

I tried multiple different changes, but without any luck
maybe someone here can help out on what I am doing wrong.
I keep getting a message:

The changes you requested to the table were not successful
because they could create duplicate values in the index,
primary key, or relationship. Change the value in the
fields or fields that contain duplicate data, remoce the
index, or redifine the index to permit duplicate entries
and try again. Now here is my code that I am using and I
get seem to figure out what is wrong.

vSSAN = Me.Parent.FMP.Column(0) & "/" & Me.Parent.SSAN
& " " & Me.Parent.FName & " " & Me.Parent.LName

End If
Set dbs = CurrentDb()
Set rst = OpenForSeek("tblFAM")
rst.Index = "SSAN"
rst.Seek "=", vSSAN
If Not rst.NoMatch Then
rst.Edit
rst.Update
rst.Close
dbs.Close
Else
Set rst = dbs.OpenRecordset("tblFAM")
rst.AddNew
rst![SSAN] = vSSAN
rst.Update
rst.Close
Me.Parent.FAMList.Requery
End If