How do I resolve the error update without addnew or edit?
I need to stay with VBA. All the files are flat with a few columns.
What rule am I missing?
[code Sub Updater()
Dim SortedAllnamesx2 As Recordset
Set SortedAllnamesx2 = CurrentDb.OpenRecordset("Sortedallnamesx2")
Dim Allnames As Recordset
Set Allnames = CurrentDb.OpenRecordset("allnames")
Dim Deletable As String
SortedAllnamesx2.AddNew
SortedAllnamesx2![aname] = Allnames![aname] ' object required
SortedAllnamesx2![lot] = Allnames![lot]
SortedAllnamesx2![location] = Allnames![location]
SortedAllnamesx2.Update
'Allnames![aname] = Deletable
Deletable = Allnames![aname]
Allnames.MoveFirst
Do While Allnames![aname] <> Deletable
Allnames.MoveNext
Loop
Allnames.Delete
Allnames.Update ' ERROR msg "update without addnew or edit"
Allnames.MoveFirst
[/code