PDA

View Full Version : MoveNext 5 times


Morgoth
03-23-2003, 08:11 PM
Hello,

Is there a way to RS.MoveNext 5 times, without having to write:

Do Until Counter = 5 Or E.O.F.
Counter = Counter + 1
RS.MoveNext
Loop


Do you know what I mean?
Thank you.

Spookster
03-23-2003, 10:03 PM
Are you wanting to go to a specific record or just pull every 5th record?

glenngv
03-24-2003, 12:44 AM
RS.Move(5)

Spookster
03-24-2003, 12:50 AM
Originally posted by glenngv
RS.Move(5)

You are able to read minds or something?

glenngv
03-24-2003, 01:05 AM
not really, I thought the question was clear to me :)

Morgoth
03-24-2003, 02:07 AM
I want to skip record 1, 2, 3, 4, 5 and produce 6, 7, 8, 9, 10.

So if I can just skip to 6, then do my code as follows:

Do Until Count = 5 or RS.EOF
Count = Count + 1
Response.Write Count & " - " & RS.("something")
RS.MoveNext
Loop

Result

1 - 6th record
2 - 7th record
3 - 8th record
4 - 9th record
5 - 10th record


So, does RS.Move(6) allow me to go to the 6th record, and then to move the the 7th, I just type RS.MoveNext?

Thank you, I will test this later if I don't get a reply.

Morgoth
03-24-2003, 03:15 AM
It worked, thank you both!


(No need to reply)

Spookster
03-24-2003, 04:58 AM
Originally posted by Morgoth
(No need to reply)

Ok :D

Morgoth
03-24-2003, 05:13 AM
See, I get an e-mail everytime someone posts message on a thread I post on, just so I can stay upbeat with every post. This is helpful when I ask for help...

So I am only replying because you had to post... and becuase I wanted to explain to you that...