This is the fastest way I've found to populate a range from a DAO.Recordset without having to move thru the recordset via a For Next Loop.
Public Sub Trial()
Dim rng as Range
Dim wrksht as Worksheet
Dim rst as Recordset (DAO.Recordset)
Dim strSQL1 as String
strSQL1 = "SELECT
.* FROM
;" '<-MS Access SQL Syntax
Set rst = db.OpenRecordset(strSQL1, dbOpenDynaset)
rst.MoveLast
MsgBox "Number of records: " & rst.RecordCount, , Title:="Number of Records Returned" 'msgbox denoting how many records returned
rst.MoveFirst
Set rng = wrksht.cells(2,1)
rng.CopyFromRecordset rst, rst.RecordCount
End Sub
Public Sub Trial()
Dim rng as Range
Dim wrksht as Worksheet
Dim rst as Recordset (DAO.Recordset)
Dim strSQL1 as String
strSQL1 = "SELECT
Set rst = db.OpenRecordset(strSQL1, dbOpenDynaset)
rst.MoveLast
MsgBox "Number of records: " & rst.RecordCount, , Title:="Number of Records Returned" 'msgbox denoting how many records returned
rst.MoveFirst
Set rng = wrksht.cells(2,1)
rng.CopyFromRecordset rst, rst.RecordCount
End Sub