I need help about record paging.
I have some basic codes but not sufficient.
I need to show 10 records each page - already done with it.
how about showing records per page like in ASP.net
example. I want to display this on the bottom of the form "<< 1 2 3 4 5 6 >> "
I dont know to how its done.
when I select "2" or Page "2", next 10 records will be shown on listview or grid.
Any help?
I have some basic codes but not sufficient.
Code:
Dim pCount As Integer
Dim page As Integer
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
rs.ActiveConnection = cn
rs.CursorType = adOpenStatic
rs.LockType = adLockReadOnly
sql_FILE = "Select * From tblPIC ORDER BY file_ID asc"
LynxGrid1.Clear
rs.Open sql_FILE, cn
rs.PageSize = 10
pCount = rs.PageCount
For page = 1 To rs.PageSize
With LynxGrid1
.Redraw = False
lRow = .AddItem(rs!File_Name)
.CellText(lRow, 1) = rs!lastname & ", " & rs!firstname
.Redraw = True
End With
rs.MoveNext
If rs.EOF Then Exit For
Next page
Set rs = Nothing
I need to show 10 records each page - already done with it.
how about showing records per page like in ASP.net
example. I want to display this on the bottom of the form "<< 1 2 3 4 5 6 >> "
I dont know to how its done.
when I select "2" or Page "2", next 10 records will be shown on listview or grid.
Any help?