Access Access hangup

Joined
Jul 19, 2011
Messages
4
Reaction score
0
Hi all,

I've been working on an add-in for microsoft access using VSTO 10 and for some reason my add-in is getting hungup when I exit access. I have all objects being set to nothing, I've tried all versions of DoCmd.Quit & Application.CloseCurrentDataBase. If I uninstall the add-in and leave the table & module the add-in created, I can close access without a problem. I've been all over the web and haven't found a solution, let's hope that changes here! Thanks guys!
 
UPDATE: I found that it's caused by accessing the current database. I have dBase = applicationObject.CurrentDB and if that gets removed then the application can close. However, I need to modify the current database...so I can't remove it. Any clue?
 
Well, after spending quite the amount of time on this problem I found a work around. I changed the database variable type to DAO.Database instead of simply Database. (That didn't work, but this portion did) Then I changed the line of code where I set the variable from "applicationObject.CurrentDb" to "applicationObject.CurrentProject.Application.CurrentDb." This worked first run. Absolutely amazing how errors get solved...even more amazing that I had to do this work around!!
 
Thanks for reporting back here with the solution Evan, it's a great help to other users that may have this problem - especially as it looks like no-one knew the answer :).

Welcome to PCR! :D
 
If I can save one person from having to spend as much time on Google as I did, then it was worth the minute or two it took to post the solution :).
 
Back
Top