This sometimes happens on my machine, close down the db, compact and repair, then try running the code ensuring that all forms and reports are closed. This usually does it, my PC usually says the db is locked by user 'Admin', and I am working on a standalone!