B
BlueWolvering
I want to load the data in a select query into array(s) in VBA code so that I
can manipulate the data. (ACCESS 2003)
Query has 7 fields (call them A, B, C, D, E, F, G) for brevity.
There could be any number of records in this query.
I want to load the data into array(s). I was thinking that the index on the
1 dimensional arrays would serve to indicate which record I was looking at.
so arrayA(1) = value in first record, first field.
arrayB(1) = value in first record, second field.
arrayB(2) = value in second record, second field.
I need to have data out of the query to perform many actions, so loading the
data into VBA is NON negotiable, but the data storage method is.
I want something that should work like this.
i=1
For each Record in SelectQuery
A(i) = record.A
B(i) = record.B
..
..
..
G(i) = record.G
i=i+1
Next Record
can manipulate the data. (ACCESS 2003)
Query has 7 fields (call them A, B, C, D, E, F, G) for brevity.
There could be any number of records in this query.
I want to load the data into array(s). I was thinking that the index on the
1 dimensional arrays would serve to indicate which record I was looking at.
so arrayA(1) = value in first record, first field.
arrayB(1) = value in first record, second field.
arrayB(2) = value in second record, second field.
I need to have data out of the query to perform many actions, so loading the
data into VBA is NON negotiable, but the data storage method is.
I want something that should work like this.
i=1
For each Record in SelectQuery
A(i) = record.A
B(i) = record.B
..
..
..
G(i) = record.G
i=i+1
Next Record