Further to thread708-1465811, I used below (found various places on this forum) and it takes only a second to open a 50k entry database with 20 columns on a Core Duo.
However you must have the database column that you use ORDER by Indexed, otherwise it takes much longer if data has been added at random and your critera contains an ORDER statement.
The initial 50 line Datagrid does not have any database settings so you have to set column names manually (or temporarily use an ADO control).
If the database is on a remote machine and slow network then it could take longer.
Close it only after you have finished with it
However you must have the database column that you use ORDER by Indexed, otherwise it takes much longer if data has been added at random and your critera contains an ORDER statement.
The initial 50 line Datagrid does not have any database settings so you have to set column names manually (or temporarily use an ADO control).
If the database is on a remote machine and slow network then it could take longer.
Code:
' Open database conection
Set CN = New ADODB.Connection
Set RS = New ADODB.Recordset
CN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & PathName & "\" & FileName
RS.CursorLocation = adUseClient
RS.Open Criteria, CN, adOpenStatic, adLockOptimistic ' Opening the recordset
Set DataGrid.DataSource = RS ' This datagrid is now configured to Timetable table so data can be viewed or changed.
'As you scroll, it gets the next data