Create Table or Query from Open Recordset?
Posted on 2005-03-13
I have a continuous form that the user can sort and filter to the nth degree. They need to print a report that is based on the forms underlying recordset after they have filtered and sorted it the way they want it to look. Is there an easy way to create a table or query from the form's recordset clone? That way I could just have the report's record source point to this new table or query.
This app is DAO, but I'm open to any method that would save me coding time for a createtabledef option with a lenghtly and complex SQL strings. The recordset for the form and report is a complex query with multiple joins and parameters. A maketable query is an option, but this will be a complex hassel because all of the field criteria references for the filters and sorts.
It seems like there should be an easy way to enumerate the fields in a recordset clone object and save it as a persistent table or query object. However, I cannot find a reasonable way to do this. Basically I just need to make the report's record souce the same as the form's resulting recordset after the form filters and sorts have been selected.
Any help would be very much appreciated!