Hi Craig, I have looked into the dictionary that you suggested, but wouldn't this be the same as the array as I would still need to know how many times to go through the while loop to add the names of the fields? Also I need to get the names of the fields back out to populate a comboBox, which I already know how to do with an array.
Many thanks John On 13/07/06, Craig Morrison <[EMAIL PROTECTED]> wrote:
Martin Jenkins wrote: > John Newby wrote: >> Yeah I can get the names, but I need to put them in an array, and to put >> them in an array I need to know the size of the array to store them >> in, so I >> need to get a count first, then store this number as the size of the >> array >> before I store the values into the array. > > Are you sure there no dynamic container objects in VB that support an > "append" method? Lists? > > If not (and I find that hard to believe) you could hack around it by > appending the names to a string, then parsing the string and then > dimensioning your array, or you could build a linked list but ... surely > VB has more intelligent containers than statically sized arrays? > > Martin > Yup, they are called dictionaries.. set myDict = CreateObject("Scripting.Dictionary") myDict.Add "Hash", "Data" .... I'll leave the rest up to the OP as this is straying from the topic at hand.. -- Craig Morrison =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= http://pse.2cah.com Controlling pseudoephedrine purchases. http://www.mtsprofessional.com/ A Win32 email server that works for You.