Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paging through recordset results to show only 9 per page.

Status
Not open for further replies.

maverik59

Programmer
Oct 30, 2002
67
0
0
GB
I have a small access database which returns about 100records. I would like to only display 9 results per page rather than them all, and have links the bottom for subsequent forward-back pages,how do i do this? Here is my code to display all the results.

<%
'Create Record Set Object
Set objRst = Server.CreateObject("ADODB.Recordset")
objRst.ActiveConnection = objConn


mysql = "Select header1,photo,header2,header3, From TableMe"


objRst.Open mysql
%>


<table>
<%
Dim intCount, intCols
intCols = 3

Do While NOT objRst.EOF %>
<tr>
<% For intCount = 1 To intCols %>
<td> <div align="center"><b>
<% Response.Write objRst("header1") %>
</b><br>
<img src="/<%Response.write objRst("photo") %>" width="205" height="100" /><br>
<% Response.Write objRst("header2") %>
<br>
<% Response.Write objRst("header3") %>
<br>
<br>
</div></td>

<%
objRst.MoveNext
%>
<% Next %>

</tr>
<% Loop %>
</table>

Any Ideas? Many Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top