Hi there,
You're not actually putting your records in an array, you are assigning the value from the recordset to a variable. So, at this point:
MyArray = rsCategory("QueryCategory")
the variable MyArray holds just the name of one category. After the next loop, it holds the name of the next category.
You could create an array and use an indexer / loopcounter to store the results (e.g. MyArray(i) = rsCategory("QueryCategory")), but I think you're much better off using the build-in GetRows method, like this:
MyArray = rsCategory.GetRows()
Check out this page for more info:
http://msdn.microsoft.com/library/de...mthgetrows.asp
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.