Take a look here: DAO workspace
And then here: DAO workspace: opening a separate transaction space
(The links are for MFC, but they apply to everything you encode.)
DBEngine.Workspaces(0) is the default workspace. You can create other workspaces that allow you to work with individual sessions; the idea is that BeginTrans and EndTrans apply to the entire workspace, but if you need to do something outside of this transaction, you can create another workspace and use it independently of your transactions in the first workspace.
Personally, I have never had to use more than one workspace when running a DAO in VBA. * shrug *
Ryan lundy
source share