I use Windows Task Scheduler to call an Access Visual Basic script file that runs an Access macro each night. When I come in each morning, the database is closed, but Access is still open. When I try to exit, the window just blanks and Access re-appears. The only way to exit is to kill the application in Task Manager. I am using the Close method for the Access application...is this incorrect? The macro is extensive and I may need to look in some of the macro steps to see if I am causing Access to hang somwewhere, so any guidance there is much appreciated.
Const DBPath = "P:\Databases\GoldmineUpdating.mdb"
Const MacroName = "01_mcrUpdateSurvAcctInfo"
Set AccessApp = GetObject(DBPath, "Access.Application")