How are frmCommand and rs declared?
If frmCommand is a Form variable, and rs is disambuguiated as from the DAO
library, it should work if you do something like this:
Dim frmCommand As Form
Dim rs As DAO.Recordset
Set frm = Forms("SomeFormNameHere")
Set rs = frmCommand.RecordsetClone
With rs
.AddNew
'Assign field values here.
.Update
frmCommand.Bookmark = .LastModified
End With
Set rs = Nothing
Set frmCommand = Nothing
The RecordsetClone has been around much longer, and seems to be more
reliable.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"GDW" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I implemented a workaround for this problem but am still interested in
> why this is not working as I would have expected and what other people
> do to handle the situation.
>
> My workaround was to the following sub in the frmCommand definition:
>
> Public Sub AddNew()
> DoCmd.GoToRecord , , acNewRec
> End Sub
>
> Works fine.
>
> Gary