Wart,
I'm still receiving the same results with your code which is similar to
mine:
For myCounter = 0 To myArrayCount - 1
Debug.Print myTestArray(myCounter)
strSQL = " where code = '" & myTestArray(myCounter)
MsgBox strSQL
Next myCounter
The above array contains 2 records based from a sql statement. When I run
the above, strSQL contains the correct data however, when the next myCounter
retrieves the next record, the first record is no longer available. Thus,
trying to concatenate the first to the last record ( the array will never
ever have more than 3 records).
The end results would be a string concatenated in to a sql statement
something like this where "myarrayrecord_#' are the records in the array:
"select * from table1 where code = 'myarrayrecord_1' and code =
'myarrayrecord_2'"
Thanks,
rob
"Wart" <nospamWart.DeleteThis@epix.net> wrote in message
news:efEbFfRGFHA.1936@TK2MSFTNGP14.phx.gbl...
> Rob,
> Something like
> Dim liCounter as Integer
> dim lsString as String
> for liCounter = LBound(MyArray) to UBound(MyArray)
> lsString = lsString & MyArray(liCounter)
> next
>
> This assumes that MyArray is a one dimesional array. For N dimension
arrays,
> just wrap the For Next loop in other For Next loops for the other
> dimensions.
>
> HTH,
> CF
>
> "Rob" <rpm_107.DeleteThis@yahoo.com> wrote in message
> news:%23sxxdRRGFHA.3608@TK2MSFTNGP14.phx.gbl...
> > is there a way to concatenate the contents of an array (looping through
> > the
> > array) and storing each item in a comma delimited string?
> >
> > Thanks!
> >
> >
>
><!-- ~MESSAGE_AFTER~ -->
>> Stay informed about: arrays