The way I use it is to load 20 records per page, the looping write is displayed in the table, and then the four-page key is used to view the data, but the problem is that although there are only 20 records per loading page, it is slow to load all the records at a time when you want to open the recordset.
Workaround One:
1. Set up a self-growing field. And this is the index.
2. Because it is ACCESS, it can only be a foreground paging. The purpose of the growth field is to achieve paging functionality.
1> records the last increment of the user's previous page, for example, M.
2> the next page to remove the starting value of a page. M+1, End value: m+1+1.5*pagesize (note: Since the database will have additions and deletions, it should take a page size should have a factor, you can set a 1 based on the circumstances of the coefficient.
3> Front loop takes RS's front PAGESIZE bar, writes it to a new RS, and returns.
Note: The new RS is a connectionless Rs.
Workaround Two:
100,000 records are not the limit of an Access database. What's more, your approach is not really a paging (you should take advantage of the PageSize and AbsolutePage attributes).
VBScript Code
Copy Code code as follows:
Set rs = New ADODB. Recordset
Rs. CursorLocation = adUseClient
Rs. PageSize = 20
Rs. Open "SELECT * from Guest", Iconc, adOpenKeyset, ADLOCKOPTIMISTICLNG
Pages = Rs. PageCount
Lngcurrentpage = 1
There are only 20 records open in the recordset at this time.
When turning the page:
Copy Code code as follows:
If Lngcurrentpage < Lngpages Then
Lngcurrentpage = lngcurrentpage + 1
Rs. AbsolutePage = Lngcurrentpage
End If