The following is the structure for VBA SQL application for Access 2000 dtatabse.
Code:
-------------------------------------
Open table 1, collect a parameter set **
Open table 2, collect a parameter set **
Loop1: For each table1 parameter
Loop2: For each table2 parameter
Open a source data table **
Loop 3: Search the record set
Calculate sum of a field on another Field condition
Set the parameter for used data in record set
Update parameter
Close the source data record set
Open table_destination_data , **
Update the table with values of Sum and parameters
on which it was calculated
End Loop 3
End Loop2
End Loop1
-----------------------------------------------
All the ** indicates opening of a record set pointing to tables (all in same database)
QUESTION:
Is it possible to open multiple record set from VBA code to calculate the required summary and update it into another table?
Will these multiple loops cause any problem with record set?
Any other suggestions to achieve this in a better way!
Code:
-------------------------------------
Open table 1, collect a parameter set **
Open table 2, collect a parameter set **
Loop1: For each table1 parameter
Loop2: For each table2 parameter
Open a source data table **
Loop 3: Search the record set
Calculate sum of a field on another Field condition
Set the parameter for used data in record set
Update parameter
Close the source data record set
Open table_destination_data , **
Update the table with values of Sum and parameters
on which it was calculated
End Loop 3
End Loop2
End Loop1
-----------------------------------------------
All the ** indicates opening of a record set pointing to tables (all in same database)
QUESTION:
Is it possible to open multiple record set from VBA code to calculate the required summary and update it into another table?
Will these multiple loops cause any problem with record set?
Any other suggestions to achieve this in a better way!