PC Review


Reply
Thread Tools Rate Thread

Access hangup

 
 
New Member
Join Date: Jul 2011
Posts: 4
 
      19th Jul 2011
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!
 
Reply With Quote
 
 
 
 
New Member
Join Date: Jul 2011
Posts: 4
 
      19th Jul 2011
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?
 
Reply With Quote
 
New Member
Join Date: Jul 2011
Posts: 4
 
      20th Jul 2011
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!!
 
Reply With Quote
 
Ian Ian is offline
Rocket Scientist
Ian's Avatar
Join Date: Feb 2002
Location: Manchester, UK
Posts: 16,071
 
      20th Jul 2011
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!
 
Reply With Quote
 
New Member
Join Date: Jul 2011
Posts: 4
 
      20th Jul 2011
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 .
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OLE Hangup? Arlen Microsoft Excel Misc 0 20th May 2010 04:02 PM
First app hangup =?Utf-8?B?bTFjcm80eHBjIG1hbg==?= Windows XP General 0 27th Jun 2006 01:31 PM
XP PRO DOS Hangup Scott Windows XP Help 1 8th Dec 2004 02:18 PM
Hangup Ledford Beard Microsoft Windows 2000 New Users 1 18th Feb 2004 06:25 PM
IE6 Hangup =?Utf-8?B?U2Fzc3lkaXZlcg==?= Windows XP Help 0 10th Feb 2004 02:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:36 PM.