Need examples of For Each..next (1 Viewer)

F

fdco

Guest
I need some examples of for each..next code
that will work with objects in a recordset.

I have records of ProductID's in a table and
I have some code to add them to another table
I just don't know where to place the for
each..next loop so the code will run on ALL
records that match my criteria.

Thanks
 

KDg

Registered User.
Local time
Today, 10:58
Joined
Oct 28, 1999
Messages
181
hi fdco,


i guess you've got your UPDATE and SELECT sorted so all you need to do is:

create recordset from query ( rst )

do until rst.eof
' update query bit
rst.movenext
loop

this will drop out at the last record. NOTE - it's not very quick if there's a lot of records.

HTH

Drew
 

Users who are viewing this thread

Top Bottom