To the best of my knowledge, no. When you compact an MDB and choose to use
the same name and location as the old MDB, what actually happens is that the
JET database engine creates a new MDB with a temporary name, compacts into
that, then deletes the old MDB and renames the new MDB with the old name.
This is definitely not the kind of thing you want to happen while
connections to the old MDB are open.
Even if it were technically possible to do it, I can't think of a situation
in which I would do that. I would commit any pending data changes, close any
open connections, do the compact and then reopen the connections.