Join on a Range of an array

Fantast

Registered User.
Local time
Today, 09:05
Joined
Dec 13, 2011
Messages
41
Hi.
I would like to do a Join on a part of an array. My code would look like this:

Code:
strJoinedVars(1) = Join(strItemsArray(1:1000), ",")
strJoinedVars(2) = Join(strItemsArray(1001:2000), ",")
strJoinedVars(3) = Join(strItemsArray(2001:3000), ",")
Obviously the strItemsArray(2001:3000) bit is wrong. Is there a correct way to do this, besides writing a UDF which loops through the array, stores the selected data into a different array and returns the new array?

I'm using Acces 2007.

Thanks a lot in advance.
 
You can't specify a range in an array. Some languages support that syntax, VBA doesn't.
 
That is a pitty. More and more I see that VBA does not like arrays. Thanks for the reply vbInet, you have been very helpfull for me so far.
 
It's just a limited data structure in VBA.

Happy to help Fantast!
 

Users who are viewing this thread

Back
Top Bottom