Foote, Chris
Chris.Foote at uk.thalesgroup.com
Thu Oct 30 04:01:20 CST 2003
Thanks again Stuart that was my problem. Once I dimmed to recordsets, recIn and recOut it now seem to work fine! Thanks! Chris Foote > -----Original Message----- > From: Stuart Sanders [mailto:stuart at pacific.net.hk] > Sent: Friday, October 24, 2003 11:09 AM > To: 'Access Developers discussion and problem solving' > Subject: RE: [AccessD] MoveNext not working > > > Your problem is that you are using one recordset to access 2 > tables. Within > your do loop you are using this > Set rec = db.OpenRecordset("tblScript") > But the loop is controlled by rec and you are reinitialising > it on each pass. > So it will never end. > > If you want to go the code method, use 2 recordsets. Say > rectblScript and > rectblOutstandingECRs. > > Then iterate through rectblOutstandingECRs and for each > record add a new record > to rectblScript. > > If you need help modifying the code drop me a note. > > Another potentially simpler method to to write a query that > does all of one you > want in one hit. (ie append query) > > Regards, > > Stuart >