I have a front-end database that I deploy as an ACCDE for the end-users. When a user deletes a record within a subform, it'll prompt and ask if they want to just "unlink" the child record from the parent record or if they want to permanently delete the child record. If they choose to delete the child record entirely, VBA will construct the delete query and run it via CurrentDB.Execute method.
This works perfectly in the master ACCDB database, however, in the ACCDE version, the delete query throws an error saying that the record cannot be deleted due a lock violation. I've been banging my head trying to figure out why the ACCDE version would create any kind of record lock when the ACCDB version doesn't, and I can't figure it out! I've tried using the DoCmd.RunSQL command instead -- same error. I've decompiled the ACCDB version, recompiled it, and republished an ACCDE version -- same exact thing. I've debug.printed every step of the sub, and the delete query's SQL statement that is created w/VBA in the ACCDE version matches the ACCDB's version perfectly. I've taken that delete query SQL and plugged it into an actual query, and it runs perfectly in the ACCDB version. I've checked the parent form and subform to ensure they don't lock any records, and they don't. I've also ensured record locking is disabled in Access. :banghead:
My next experiment will be to create and save a delete query that gets published with the ACCDE version to see if that errors out too.
Has anyone ever experienced this where an exact ACCDE copy of an ACCDB database creates a record lock that prevents records from being deleted/edited? I am stumped!
This works perfectly in the master ACCDB database, however, in the ACCDE version, the delete query throws an error saying that the record cannot be deleted due a lock violation. I've been banging my head trying to figure out why the ACCDE version would create any kind of record lock when the ACCDB version doesn't, and I can't figure it out! I've tried using the DoCmd.RunSQL command instead -- same error. I've decompiled the ACCDB version, recompiled it, and republished an ACCDE version -- same exact thing. I've debug.printed every step of the sub, and the delete query's SQL statement that is created w/VBA in the ACCDE version matches the ACCDB's version perfectly. I've taken that delete query SQL and plugged it into an actual query, and it runs perfectly in the ACCDB version. I've checked the parent form and subform to ensure they don't lock any records, and they don't. I've also ensured record locking is disabled in Access. :banghead:
My next experiment will be to create and save a delete query that gets published with the ACCDE version to see if that errors out too.
Has anyone ever experienced this where an exact ACCDE copy of an ACCDB database creates a record lock that prevents records from being deleted/edited? I am stumped!