G
Guest
Hi guys
I am trying to create a subroutine that will loop through a recordset of
items and add them to a new record in a subform in datasheet mode. However,
I cannot seem to get the action to goto the next record. It "cannot go to
specified record" if I use:
DoCmd.GoToRecord , , acNewRec
Here is my code:
Do While Not rsItemGroups.EOF
DoCmd.GoToRecord , , acNewRec
Me.Item = Nz(rsItemGroups!ListID)
Me.Quantity = rsItemGroups!Quantity
I tried using a recordset clone to move to the next record, addnew and
update, however, I have a combo box that sets some of the fields as well as
some event handlers that dont seem to work with this method.
Any suggestions?
Thanks
David
I am trying to create a subroutine that will loop through a recordset of
items and add them to a new record in a subform in datasheet mode. However,
I cannot seem to get the action to goto the next record. It "cannot go to
specified record" if I use:
DoCmd.GoToRecord , , acNewRec
Here is my code:
Do While Not rsItemGroups.EOF
DoCmd.GoToRecord , , acNewRec
Me.Item = Nz(rsItemGroups!ListID)
Me.Quantity = rsItemGroups!Quantity
I tried using a recordset clone to move to the next record, addnew and
update, however, I have a combo box that sets some of the fields as well as
some event handlers that dont seem to work with this method.
Any suggestions?
Thanks
David