I have a situation that needs to handle millions of rows in Ms Access.
The data come from a SQL server and in normal cases a continuous form would be just right but the rows its the only issue as i have table with many columns.
So i started examining alternatives like ListView or MsFlexGrid...what troubles me is that i would like to have something lazy loading....the first 1000 rows load and then the user as scrolls down/up the next set of data are loaded.
I have tested this functionality some years with DGV on a small .NET application but i haven't seen anything similar in Access + ActiveX control, something to add is the necessity for the control to display the total rows that are eligible for retrieval...eg. 100,000 rows but only loading sets of 1000...
I also need this to be a free solution ..
Any ideas....
I am afraid that documentation for such kind of extended Controls is quite old and i stumble on dead sites...so a good direction would be great.
Last but not least...no editing would be necessary..simply for viewing.

- 974
- 8
- 16
-
Could you please give a little bit more details why you cannot use access forms? You have more than 255 columns? – Sergey S. Oct 31 '17 at 13:35
-
I am already using forms...i am just researching for better options... – John Oct 31 '17 at 14:27
-
You don't need new controls. Just don't link the table directly as a dataSource, instead have your own navigation buttons and place your SQL command with offset/row_number. That should load only range of your requested rows – Krish Oct 31 '17 at 15:40
-
You could also look at using a stored procedure to provide a server side snapshot based around the current row count. It's also easy to provide a total record count in the same process. As others have said no need for any external controls. – Minty Oct 31 '17 at 16:06
-
Probably you are referring to pagination...this is easy and i have already implemented it...the question is if i can get the row count as the user scrolls the data and accordingly load the data...it would require to have API calls to minimize the scroll thumb and get the extract position.... – John Oct 31 '17 at 17:22
1 Answers
There is really zero reason to pull or have a form scroll past 1000’s of records. Such a process is sheer torture to users.
For what possible reason would you want users to scroll past 1 million rows in a form? I don't think software developer skills are required here that such a approach REALLY needs to be avoided.
The solution is to simply ask, or get some search criteria BEFORE you fill the form with results.
This form works great on tables with 1 million rows. You type in the first name, and then perhaps a bit of the last name. You then fill the form with JUST the results.
Even on tables with huge numbers of rows, it performs instant.
The form can look like this access example:
The code behind a search button looks like this:
Dim strSQL As String
strSQL = "select * from tblcustomers where LastName like " & Me.LASTNAME & "*'" And _
"FirstName like " & Me.FIRSTNAME & "*'"
Me.RecordSource = strSQL
The above will performance near instant – even if the form is based on a linked table to sql server.
Floating the idea to try and pull and page 1 million rows makes ZERO sense in Access, .net, or any web based application. To avoid sheer torture to users, simply add some kind of filter or search criteria.
Access as a client to SQL server will ONLY pull records down the network pipe based on the criteria – the whole table is not pulled, and SHOULD not be pulled nor should some messy paging approach be attempted here.
I should also point out that the above example is a simple Access continues form - no activeX or grid control is required - the feature set you required is built right into Access.

- 42,205
- 3
- 34
- 51
-
Well everybody knows that puling thousands of records is a pain but i have caught a lot of people including myself just scrolling on big lists..especially when there is data fields....you just scroll and scroll until you have reached the "area"...Because i consider you to be one of the top Access experts could you guide me on finding a code example on scroll detection for the ListView control...i think this is the solution....the listiview scrolls and accordingly it "loads" the next records... – John Nov 01 '17 at 06:34
-
Unfortunately, I don’t have sample code. You could google some vb.net code and adopt that. I don’t have a sample since it something I never had to, or would attempt. If someone did not care about cost, and I informed them this is less than ideal money spent, then in good conscience I would write such code. And to be fair, there are certainly UI’s that page, or flow data as it is required as the user moves along. So I not necessary saying this 100% bad, but with Access as the dev tool just the decision to adopt ActiveX REALLY spikes up the distribution cost issues let alone the code + effort. – Albert D. Kallal Nov 02 '17 at 10:22
-
I already have a vb.net solution working that implements this functionality....i just abandoned the idea ... – John Nov 02 '17 at 12:39