tags:

views:

53

answers:

2

I'm working on a bit of Access 2003 VBA code that pulls data from a temporary table and shows it in a forms recordset, I then need to delete the temp table but I can't do this until I've disconnected from the Recordset, which removes the data.

What can I call instead of Recordset.Close or RecordSource = "" which would keep the data on the form but close the connection to the table so I can delete it.

Thanks !

A: 

Can you Clone the recordset so you have a copy?

Raj More
Have you tested your answer?
David-W-Fenton
I have done this before. Create a new recordset, copy the field structure and then copy the data over. Basica implement the ADODB.RecordSet.CLONE functionality for a DAO recordset.
Raj More
+1  A: 

Off the top of my head, I think you can create a disconnected recordset by setting the recordset's ActiveConnection property to Nothing after you've gotten the data that you wanted. Google "disconnected recordset" for more info.

jkchong
Note that this solution requires ADO.
Tony Toews