Foote, Chris
Chris.Foote at uk.thalesgroup.com
Fri Oct 24 05:22:41 CDT 2003
Cheers Stuart!
I'll have a look at this. I don't think I can use a query for this as, apart
from adding a predefined first and last record, I also need to add five
predefined records between each "dynamic" record as I loop through. I did
snip this out of my code when I originally posted.
Thanks again!
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
>
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> > Foote, Chris
> > Sent: Friday, 24 October, 2003 5:21 PM
> > To: 'Access Developers discussion and problem solving'
> > Subject: [AccessD] MoveNext not working
> >
> >
> > Good morning all!
> >
> > Can anyone please see what I've doing wrong in the code below?
----------~(Orginal post snipped)---------