[RESOLVED] Sorting data into an array & performing a calculation
The total amount of points each user has is added to a different score, to give a total score. This is then sorted into descending order. The names and average speed results for each user are sorted into the same position in their arrays as the points array. The names of the first 8 users with the highest scores are entered into 8 separate textboxes. I aimed for the first 8 results in the Speed Array to be in the same position in the array as the top 8 user's names, so that I was able to calculate the time it would take for them to run a certain distance. However, when I wrote the code so that the first 8 results stored in the speed array would be displayed in the text1 textbox on the form, they all showed the same number. The calculation works, but the values stored in the speed array are wrong and I can't figure out why. Any help would be greatly appreciated, screenshots of code and the form are attached.
Re: Sorting data into an array & performing a calculation
It's hard to follow your code based on screenshots. Could be why not many replies to your thread.
If the problem is that the speedarray(x) are all the same, it is probably because you are not moving the adoAverage recordset pointer in your Sub Points() loop
Insomnia is just a byproduct of, "It can't be done"