[AccessD] MoveNext not working - solved

Foote, Chris Chris.Foote at uk.thalesgroup.com
Fri Oct 24 05:42:22 CDT 2003


Thanks Stuart, that was my problem!

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
> 


More information about the AccessD mailing list