View Full Version : Crosstab info into an array ...? (I'm lost!)


yippie_ky_yay
08-07-2003, 10:36 AM
Hey everyone - I posted this earlier in the reports section, but then realized that it's more of a VBA question.

My boss would like a report that would look something like this:
CompanyName RangeName, RangeName, RangeName

but my data is set up like this:

tblRange
RangeID
RangeName

tblCompanies
CompanyID
Companyname

tblMain
CompanyID
RangeID


I have no problem grouping by Company to get the Ranges listed one after another - but I need to get them side by side in a textbox.

I know I could add something like this into a For loop:
strRange = strRange & strRangeArray(i) & " "
but populating the array with the data I need is where I'm completely lost.

Any help would be greatly appreciated!

-Sean

AncientOne
08-07-2003, 02:46 PM
http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=52638

Is this what you want to do?

yippie_ky_yay
08-08-2003, 05:38 AM
Yes, exactly AncientOne! Thank you!!
-Sean

AncientOne
08-08-2003, 05:41 AM
note the small error in the code. Must add a space after the comma in the query's SQL