Problem with recordset EOF (1 Viewer)

DocNice

Registered User.
Local time
Yesterday, 23:16
Joined
Oct 6, 2004
Messages
76
I have a recordset that says Recordcount is 7, but when I tell it to MoveLast, it goes to 6. If it's on 6 and I tell it to MoveNext, it goes into EOF and gives errors.

The code is too long to post here, but I did a search and saw some comments about problems with nested loops. This makes sense because it only gives the error when I call other loops and recordsets outside the function. But I don't know a way around that. I'm actually working on the same data in a few different recordsets, but I'm not sure why that would cause a problem if they're all separately defined (I also tried using the same recordset multiple times). And either way, when I say MoveLast, it seems that it should know that if there are 7 records, then it goes to the last one.

Any ideas?
 

KenHigg

Registered User
Local time
Today, 02:16
Joined
Jun 9, 2004
Messages
13,327
Maybe it starts counting with 0 instead of 1?
 

DocNice

Registered User.
Local time
Yesterday, 23:16
Joined
Oct 6, 2004
Messages
76
Yes, you're right. My problem must be elsewhere. Thanks.
 

Users who are viewing this thread

Top Bottom