How do I create a recordset, from a query, hold it in memory, and then run another query using the one held in memory?
confused? I’ll try to explain.
I have a database, in the database is a bit of code that builds a query
Set db = CurrentDb
sqlstr = "SELECT * FROM [user query] WHERE [shift] IN(" & Shift_Criteria & ");"
Set Q = db.QueryDefs("Query_Results")
Q.SQL = sqlstr
Q.Close
that query is then used to form the basis for another number of queries. it works great,
but (you knew there was one comming)
inbetween me running the code to generate the first query and running any of the subsequent queries someone else runs the code for the first query again generating a diferent query (Shift_Criteria changes) and a diferent set of information. All my subsiquent queries run against the new data, not my data.
How can I stop this from happening?
Someone must be able to help me.