G
Guest
I import some records into a temporary table "Temp_Products".
During subsequent processing, I do the following:
Set myTable = DB.OpenRecordset("Temp_Products")
---Do some processing---
myTable.Close
Set myTable = Nothing
and the table closes. I can then delete the table successfully.
Sometime during processing (but not while the table is already open as
above) I do the following:
DoCmd.OpenQuery "Import_Previously_Unrecorded_Products"
This is an append query that takes data from Temp_Products and puts it into
the appropriate permanent table.
Whenever I do the latter, at the end of the routine, when I try to delete
Temp_Products, I get error 3211 "The database engine could not lock table
'Temp_Products' because it is already in use by another person or process.
Since this is a single user system, I know it is not in use by another
person. The only thing I can think is that it is still in use somehow by the
query I ran.
How do I get around this? Is there a more appropriate to run an append query?
During subsequent processing, I do the following:
Set myTable = DB.OpenRecordset("Temp_Products")
---Do some processing---
myTable.Close
Set myTable = Nothing
and the table closes. I can then delete the table successfully.
Sometime during processing (but not while the table is already open as
above) I do the following:
DoCmd.OpenQuery "Import_Previously_Unrecorded_Products"
This is an append query that takes data from Temp_Products and puts it into
the appropriate permanent table.
Whenever I do the latter, at the end of the routine, when I try to delete
Temp_Products, I get error 3211 "The database engine could not lock table
'Temp_Products' because it is already in use by another person or process.
Since this is a single user system, I know it is not in use by another
person. The only thing I can think is that it is still in use somehow by the
query I ran.
How do I get around this? Is there a more appropriate to run an append query?