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!

linking numbers to pages

Status
Not open for further replies.

codejunkie

Programmer
Oct 5, 2000
5
0
0
KE
Hi,
I want to list the pages in my recordset to numbers at the bottom of the table as in,,
go to 1 2 3 4 etc
where the link goes to first record in that page.
Anyone got ideas...
 
Well at somepoint you have to get a count of how many records you want on a page.

then in a loop create that many records in a table or something
Say if you wanted 25 records on a page then
have a counter that counted to 25 and put them in a recordset.
Pass the recordset to your page
when they press the button again then get the next 25 and pass that to the page. [sig]<p>DougP, MCP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.[/sig]
 
you can use PageSize Properties of the recordset to do this thing
for e.g.

Set rstEmployees = New ADODB.Recordset

rstEmployees.CursorLocation = adUseClient
rstEmployees.Open &quot;employee&quot;, strCnn, , , adCmdTable

rstEmployees.PageSize = 5
ctrPageCount = rstEmployees.PageCount
For ctrPage = 1 To intPageCount
rstEmployees.AbsolutePage = intPage
AnyMessage = &quot;&quot;

For intRecord = 1 To rstEmployees.PageSize
strMessage = strMessage & _
rstEmployees!name & &quot; &quot; & _
rstEmployees!hire_date & vbCrlf

rstEmployees.MoveNext
If rstEmployees.EOF Then Exit For
Next intRecord
MsgBox strMessage
Next intPage
rstEmployees.Close
i hope this will clear you and also you can check out msdn as well
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top