Displaying certain no. of records (1 Viewer)

hassaan

[HassaaN]
Local time
Today, 09:23
Joined
Jul 7, 2005
Messages
14
I have an access database - There are about 1000 records in a table. What I want to do is display 50 records on each page. The code I have used is given below. The problem with this is that it continues until all records are displayed (which means 100 records or so). This not only looks bad but it even slows down the speed. Suggest something to cure this. Also, please mention if it is possible to have links like
--- NEXT 100 (i think this is easily possible)
--- LAST 100 (how should this be done)


----------------------------------------------------
FULLNAME="SELECT FULLNAME FROM TABLE ORDER BY RANK"
TOTAL="SELECT TOTAL FROM TABLE ORDER BY RANK"

SET FULLNAME=CON.EXECUTE(FULLNAME)
SET TOTAL=CON.EXECUTE(TOTAL)

do while not FULLNAME.EOF
for F=0 to FULLNAME.fields.count-1

do while not TOTAL.EOF
for L=0 to TOTAL.fields.count-1

%>

<tr bgcolor="<%=rowColor%>">
<td"><%=FULLNAME.fields(F).value%></td>
<td><%=TOTAL.fields(L).value%></td>
</tr>


<%
next
FULLNAME.movenext
TOTAL.movenext
loop

next
loop
%>
---------------------------------

Your effort is appreciated!:)
 
Last edited:

Users who are viewing this thread

Top Bottom