Adding rows in the array

D

diamond

I have following code and I want to put each row (with few changes) into
array so that in the end all the "changed" rows would be in one array. Any
clue how to do this? Thanks!

Sub TestGetRows()
Dim varValues As Variant
Dim recSales As Recordset
Dim intRowCount As Integer
Dim intFieldCount As Integer
Dim SQL As Variant
Dim iSQL As Variant
Dim i As Integer
Dim j As Integer
i = 0
Set recSales = CurrentDb().OpenRecordset("xy")
varValues = recSales.GetRows(2)
recSales.Close

intFieldCount = UBound(varValues, 1)
intRowCount = UBound(varValues, 2)

For j = 0 To intRowCount
iSQL(j) = varValues(0, j) & "','" & varValues(1, j) & "','" &
varValues(2, j)


Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top