Movian
03-16-2009, 07:44 AM
Hi,
i have a sub that goes through a word document and creates a multi dimension array of the following format (0 to 1, 0 to Variable) as string
where by (0,0) would equal a table name and (1,0) would equal a field name. The reason this might seem backwards is because for some reason access will only allow me to redim preserve the second array block (0, this one)
so any way, i have been looking around at all the different options. The array shouldn't be any bigger than say 100 array values (on the second column, meaning 200 total) so a bubble sort would be usable. What i am trying to find is a function (or create a function) that when passed an array, will return an array that is sorted on the identified column. Alternatively it can be a sub that sorts the Actual array parsed to it. However i am aware that you cant make an array a public variable. so i am unsure as to how to go about it. Also if the function returned a NEW array would i be able to do somthing akin to
NewArray = MovianSort(oldarray,2)
?
or is that just wishfull thinking ?
i have a sub that goes through a word document and creates a multi dimension array of the following format (0 to 1, 0 to Variable) as string
where by (0,0) would equal a table name and (1,0) would equal a field name. The reason this might seem backwards is because for some reason access will only allow me to redim preserve the second array block (0, this one)
so any way, i have been looking around at all the different options. The array shouldn't be any bigger than say 100 array values (on the second column, meaning 200 total) so a bubble sort would be usable. What i am trying to find is a function (or create a function) that when passed an array, will return an array that is sorted on the identified column. Alternatively it can be a sub that sorts the Actual array parsed to it. However i am aware that you cant make an array a public variable. so i am unsure as to how to go about it. Also if the function returned a NEW array would i be able to do somthing akin to
NewArray = MovianSort(oldarray,2)
?
or is that just wishfull thinking ?