This has stumped me for a while, so I am hoping that someone here has an efficient way to do this using SQL from VB.
Basically what I want to do is average certain fields in the 1st and 2nd record of a recordset and output the result to a new recordset. Then do the same for the 1st and 3rd, 1st and 4th, 1st and 5th and so on...until I reach the end of the recordset. The process then needs to repeat itself with the 2nd and 3rd, 2nd and 4th etc etc etc. until it has iterated through every record in the recordset.
Right now the program is outputing the averages to an array one record at a time then adding the data to new recordset...aga in one record at a time. The process is painfully slow, I am hoping that there is a more efficient way to do it.
Oh by the way it is an Access database and I am using VB 6.
Any suggestions are welcome.
Thanks
Basically what I want to do is average certain fields in the 1st and 2nd record of a recordset and output the result to a new recordset. Then do the same for the 1st and 3rd, 1st and 4th, 1st and 5th and so on...until I reach the end of the recordset. The process then needs to repeat itself with the 2nd and 3rd, 2nd and 4th etc etc etc. until it has iterated through every record in the recordset.
Right now the program is outputing the averages to an array one record at a time then adding the data to new recordset...aga in one record at a time. The process is painfully slow, I am hoping that there is a more efficient way to do it.
Oh by the way it is an Access database and I am using VB 6.
Any suggestions are welcome.
Thanks
Comment