Dim i As Integer
Dim j As Long
rst.Open "Select WhateverFields from WhateverTable;", CurrentProject.Connection, adOpenForwardOnly
ReDim ArrayName(rst.Fields.Count - 1, 0)
While Not rst.Eof
For i = 0 To rst.Fields.Count - 1)
ArrayName(i, j) = rst.Fields(i)
Next i
j = j + 1
Redim Preserve ArrayName(UBound(ArrayName,1), j)
rst.MoveNext
Wend
will put 1000 rows into the array. If you want all the rows, then either put a number bigger than all the rows in or use vArray=rs.getrows(rs.recordcount)
hth
Ben
----------------------------------------------
Ben O'Hara
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.