I am attempting to add a new record to a table and I am able to access the table OK and move to the last record with .MoveLast
But then I add a new record with .AddNew and the record appears in the table but when I attempt to edit that record, I find that I am not indexing the new record but the last record so I added another .MoveLast but this does not select the new record for me to update.
how do I add a new record to the end of the table and then select the new record to update it?
thank you
Code:
Set rst = dbs.OpenRecordset(strSQL, dbOpenDynaset, dbAppendOnly)
If rst.EOF = False Or rst.BOF = False Then
rst.MoveLast
rst.AddNew
rst.MoveLast
With rst
.Edit
!Assembly = Me.Asm
.Update
End With
rst.close ' Close the recordset.
Set rst = Nothing
Set dbs = Nothing
End If