View Full Version : Start printing from the second result ?

Jul 9th, 2002, 07:15 PM
Hi everybody,
Here's my problem:

Suppose i have list box that will carry only 10 rows, and i made a search but my result brought up 13 rows. So what i want to do now is to show the latest 10 rows which mean the list box will start from 3 till 13 so it'll be exactly 10 rows in that list box.

That's my problem and i want to know how to get my records from a database that will start from the third row.

Some other idea is to start from the bottom to the top, but again i don't know how to do it , So please can u help in this
:confused: :thumbsup:

Jul 9th, 2002, 10:12 PM
You can use the GetRows() or GetString() method to store your rs into a 2d array or a string(you can split this string to create an array). Whatever method you choose when you loop through

iLastTenRec = UBound(myRsArray) - 10

For x = iLastTenRec to UBound(myRsArray)
fill list box here.

The syntax may not be 100% but I hope you get what I am talking about. If you need some more code let me know.


Jul 11th, 2002, 11:22 AM
Thank you very much for that great help, it's actually a very good and simple way to do it. Thank you again :thumbsup: