I have a vb 6 project and an access 2000 database and I create a crosstab recordset (transform statement ) by executing a crosstab query on the database that returns a ado recordset. I need now a function in vb 6 that will accept as parameters a standard ado recordset that will return a crosstab recordset by manipulating the normal recordset that is passed in. I need this because I want to create the crosstab recordset without making a connection to the database. This function will have also parameters passed in that will represent the Row Value , the Column Value and The Measure Value ) . The function would look something like this : Private Function CreateCrossTabRecordset (NormalRst as [login to view URL], ArrayRowValues() as string, ColumnField as string, ValueField as string,AggregationType As String) ) as [login to view URL] dim TempRst as [login to view URL] '''''''Create Crosstab Recordset set CreateCrossTabRecordset = TempRst End Function. Note :The parameters that are passed in correspond to field names that are inside the original ado recordset. I have included a sample demo showing how I perform this function now and how I would like it to perform. Specifications : The parameter AraryRowValues passed into the function will be a string array because the row values may be more than one. The elements of the array will correspond to field names from the original recordset The parameter Column field will represent a string corresponding to a field name from the original recordset and will create the field value of the new crosstb recordset. The parameter Value Field will represent a string corresponding to a field name from the original recordset and will be use as the value field in the new crosstab recordset. The parameter AggregationType will represent a string and possible values will be : Sum Min Max Average Count According to the value supplied in the function the recordset will perform the appropriate aggregation.
## Deliverables
1 .I need a function in the sample Project that I have included so that when I press the button ''How i would like it to work" the results returned to the datagrid are the same as as if I pressed the button ''How it works now.''. [login to view URL] and fully-functional working program(s) in executable form as well as complete source code of all work done. 3. Complete ownership and distribution copyrights to all work purchased.
## Platform
Windows 98,2000,xp