In general, this happens when an exit is disallowed for consistency reasons. I don't recall how you get this way but there is a thing called "process rundown" that occurs when you are trying to close a process (task, session thread) and you cannot.
Process rundown requires the closing process to release resources by closing files and releasing locks and releasing allocated resources back to the O/S. But if for some reason that can't happen, then the process cannot complete the rundown. It almost ALWAYS is related to an incomplete operation - which includes things you didn't finish and things that you CANNOT finish because a cooperating process has to let go of you first.
Unfortunately, there are myriads of reasons for this type of rundown problem and I know that I don't know anywhere near all of them. If you search for the error "You can't exit Microsoft Access now" you will find dozens of reports of this problem going back not less than seven years and maybe a lot more. (I gave up looking at them all once I saw how many there were.)
Not a lot of solutions in what I found, but the MSDN.SOCIAL site had a couple and the MS engineers actually were able to reproduce the error. They just couldn't figure out what was causing it. I know that is no help to you, but look at it this way - you are not alone.