I have the following code:
DoCmd.RunSQL "Delete * FROM TTempOrderImp WHERE (((TTempOrderImp.RprtQty)=0 Or (TTempOrderImp.RprtQty)<0));"
This code runs fine, but when I want to run a different procedure with the table TTempOrderImp I get a bug that states, "The database engine could not lock table 'TTempOrderImp' because it is already in use by another person or process." I have to then exit the Database in order to get the procedure to work again or to "unlock" the database. Is there code I can type in after this delete so that it unlocks the table?
DoCmd.RunSQL "Delete * FROM TTempOrderImp WHERE (((TTempOrderImp.RprtQty)=0 Or (TTempOrderImp.RprtQty)<0));"
This code runs fine, but when I want to run a different procedure with the table TTempOrderImp I get a bug that states, "The database engine could not lock table 'TTempOrderImp' because it is already in use by another person or process." I have to then exit the Database in order to get the procedure to work again or to "unlock" the database. Is there code I can type in after this delete so that it unlocks the table?