PC Review


Reply
Thread Tools Rate Thread

Adding rows in the array

 
 
diamond
Guest
Posts: n/a
 
      15th Apr 2009
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding rows to the data array used in an Index function Lanhing Microsoft Excel Misc 1 7th Apr 2009 07:45 PM
Adding rows to a 2 dimensional array ... netnews.comcast.net Microsoft Excel Programming 5 6th Nov 2006 01:05 PM
Adding a NULL to an array then adding array to a data table =?Utf-8?B?RmlkZGVsbTM3NDI=?= Microsoft ADO .NET 4 18th May 2006 07:18 PM
Adding or Deleteing Rows in a Range with an Array formula =?Utf-8?B?Q2FzZXk=?= Microsoft Excel Programming 2 3rd Oct 2005 08:27 PM
Adding rows to an array =?Utf-8?B?Y2hyaXMgdw==?= Microsoft Excel Worksheet Functions 1 10th Dec 2004 02:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:18 AM.