goto next record in a data***

From: dp (dp_at_discussions.microsoft.com)
Date: 01/25/05


Date: Tue, 25 Jan 2005 11:49:01 -0800

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 data*** 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