Hello Team,
I am new here. I have one access db with few linked files ( excel and text ). The text file has over 100K rows ( detailed data ) , so I am using interim access table/query to group it and dump into Excel file, which is then again linked to a form in the same DB. ( Reason for this is to easily debug data in excel vs text, so ple. ignore the processing here ).
dumpData.txt
processedExcelFile.xls
I want to give user an ability to do on demand processing, just in case if they have more than one updates in a day. So, I added button on form and in macro I am doing following steps.
1. Close the form ( so linked Excel file is not actively locked )
2. Empty out temporary processing tables in Access.
3. Import text file into that temp table.
4. Drop the linked excel file ( using DoCmd.Deleteobject acTable, "processedExcelFile.xls" )
5. Dump query output (grouped for some criteria ) into Excel file using
DoCmd.TransferSpreadsheet acExport, excel....
6. Relink Excel file into Access as table using DoCmd.TransferSpreadsheet acLink , ...
Problem I run into is step 5, when I am trying to export the query output into excel file, it gives me
"The database engine could not lock table <name> because it is already in use by another person or process. (Error 3211)"
I cannot figure out where is the excel file being locked..
Can anyone please help me ?
Regards,
JB
I am new here. I have one access db with few linked files ( excel and text ). The text file has over 100K rows ( detailed data ) , so I am using interim access table/query to group it and dump into Excel file, which is then again linked to a form in the same DB. ( Reason for this is to easily debug data in excel vs text, so ple. ignore the processing here ).
dumpData.txt
processedExcelFile.xls
I want to give user an ability to do on demand processing, just in case if they have more than one updates in a day. So, I added button on form and in macro I am doing following steps.
1. Close the form ( so linked Excel file is not actively locked )
2. Empty out temporary processing tables in Access.
3. Import text file into that temp table.
4. Drop the linked excel file ( using DoCmd.Deleteobject acTable, "processedExcelFile.xls" )
5. Dump query output (grouped for some criteria ) into Excel file using
DoCmd.TransferSpreadsheet acExport, excel....
6. Relink Excel file into Access as table using DoCmd.TransferSpreadsheet acLink , ...
Problem I run into is step 5, when I am trying to export the query output into excel file, it gives me
"The database engine could not lock table <name> because it is already in use by another person or process. (Error 3211)"
I cannot figure out where is the excel file being locked..
Can anyone please help me ?
Regards,
JB