Re: How walk recset in DAO, do AddNew & return to CurRec B4 AddNew?
- From: MLH <CRCI@xxxxxxxxxxxxxx>
- Date: Sun, 26 Mar 2006 09:29:28 -0500
Oops. Oops. Oops. My bad.
Had an extra .MoveNext in there that was unaccounted
for. More bad programming on my part. Sorry about that.
After taking it out and organizing my code more legibly,
I found that the A97 HELP stmt was correct. The rec that
was current before DOES remain current. So sorry.
Something I did not realize caused me further confusion.
I did not understand that using AddNew in a DAO procedure
would increase the number of records in your recordset as
well as appending a record to the underlying table. Basically,
I was walking the recordset looking for records whose [Field1]
value was "x". When I found one, I was appending an identical
record to the underlying table, but making the [Field1] value "y".
This not only added a record to the underlying table, it added
one dynamically to the recordset. Since I was looping to EOF -
I never got there and had to CTRL-ALT-DEL and end the
process. I ended up having to do away with the Do Until - Loop
and go with a For i=1 to .RecordCount approach. What would
some of you recommend in that situation?
.
- Follow-Ups:
- References:
- Prev by Date: Connection to Access DB
- Next by Date: Re: Problem automating outlook
- Previous by thread: Re: How walk recset in DAO, do AddNew & return to CurRec B4 AddNew?
- Next by thread: Re: How walk recset in DAO, do AddNew & return to CurRec B4 AddNew?
- Index(es):
Relevant Pages
|