6
66 Fox
I just solved a problem I was having with my laptop running XP SP2 with
Office 2000 SP3 and Visual Basic 6 SP6 loaded. The problem was with the MS
Action Query Wizard
http://support.microsoft.com/?kbid=263471
that I had installed. Whenever I used automation from VB or VB Script to
create an instance of Access 2000 and then finally used the .Quit method,
two new instances of Access were started, then stopped, started, stopped, ad
infinitum. Only starting Access from the Windows start menu or Office
shortcut bar would bring this behavior to a halt. I spent several weeks
pulling out what hair I have left trying to solve it. It would occur with
any database. I even uninstalled/reinstalled Access. I finally solved it
today by throwing in a loop to close all running instances of Access while
one was still running. This invoked an error message box with ActQryWiz in
the title. I uninstalled the Action Query Wizard and all is well again.
Has anyone else run into this? The ActQryWiz.dll appears to import a number
of functions from MSVBM60.dll, so maybe VB SP6 is the problem. Or is
Windows XP SP2 or Office SP3 the problem?
This is the code that would cause the problem.
Set AccApp = CreateObject("Access.Application")
loc = "C:\Documents\db1.mdb" 'put any database here
AccApp.OpenCurrentDatabase loc
'do whatever you want on next line or leave it blank-it didn't matter
AccApp.Run "PrintMyReports"
AccApp.CloseCurrentDatabase
AccApp.Quit
Set AccApp = Nothing
I will now have a Happy New Year!
Dave
Office 2000 SP3 and Visual Basic 6 SP6 loaded. The problem was with the MS
Action Query Wizard
http://support.microsoft.com/?kbid=263471
that I had installed. Whenever I used automation from VB or VB Script to
create an instance of Access 2000 and then finally used the .Quit method,
two new instances of Access were started, then stopped, started, stopped, ad
infinitum. Only starting Access from the Windows start menu or Office
shortcut bar would bring this behavior to a halt. I spent several weeks
pulling out what hair I have left trying to solve it. It would occur with
any database. I even uninstalled/reinstalled Access. I finally solved it
today by throwing in a loop to close all running instances of Access while
one was still running. This invoked an error message box with ActQryWiz in
the title. I uninstalled the Action Query Wizard and all is well again.
Has anyone else run into this? The ActQryWiz.dll appears to import a number
of functions from MSVBM60.dll, so maybe VB SP6 is the problem. Or is
Windows XP SP2 or Office SP3 the problem?
This is the code that would cause the problem.
Set AccApp = CreateObject("Access.Application")
loc = "C:\Documents\db1.mdb" 'put any database here
AccApp.OpenCurrentDatabase loc
'do whatever you want on next line or leave it blank-it didn't matter
AccApp.Run "PrintMyReports"
AccApp.CloseCurrentDatabase
AccApp.Quit
Set AccApp = Nothing
I will now have a Happy New Year!
Dave