Link to home
Start Free TrialLog in
Avatar of Scott Lamond
Scott LamondFlag for United States of America

asked on

Access Database Serious Error

I have designed a system of Scheduled Tasks that do numerous database updates and exporting of reports to HTML: repeating the process of logging in, completing the tasks and then logging out of Windows Server 2008 R2 every 15 minutes. Occasionally, the system fails since Microsoft Access 2010 creates a dialog box announcing that the target database created a serious error the last time it was opened and asking the user if it should be opened. Since there is no human present to reply it just waits.

Using Google Search, I've learned that there is a Disabled Items list that the target database must be removed from. How can this be done via Access' Visual Basic commands (I typically use Open Event code) or via some other command?
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Is it VBA code running in Access or is it VB.NET code?
Avatar of Scott Lamond

ASKER

Sorry, I need to correct the tags if possible. It's VBA.
Hi slamond

I think you'll find the disabled items list in the registry at this key:

HKCU\Software\Microsoft\Office\14.0\Access\Resiliency\DisabledItems

One solution would be to have the task manager execute a batch file instead of starting Access directly.  The batch file could run a VBscript file which checks the registry for the disabled item entry and deletes it if it is found.  Then the batch file can open the database without a problem.

Best wishes,
Graham Mandeno [Access MVP 1996-2014]
To GrahamMaddeno, if you or anyone else can provide the code for what you suggest it would be appreciated. My vbscript skills are limited to IF THEN ELSE.
S.
What would be the exact syntax for that code?
here's a script to delete registry keys - you need to modify it to suit your situation and use with caution!

Dim WSHShell
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegDelete "HKCU\Software\Microsoft\Office\14.0\Access\Resiliency\DisabledItems"    ------ <<< make this specific for you cirsumtances!!!!
set WSHShell = nothing
You may want to find out what error Access is reporting before you hide the fact that an error happened.
For the benefit of any reader that is reviewing this incident from an historical perspective, while waiting for expert advice I had the idea to strategically space the Scheduled Tasks to minimize the chances of conflicting data access. Since taking that action the error has occurred only once. The only downside now is that it will be more difficult for me to follow JimFive's suggestion of isolating the error.

I will keep this question open until I can possibly find an event ID that points to a more specific cause of the error.
slamond,
Based on the above comment, can you make sure that the Database Option "Compact on Close" is NOT checked.
That option is not selected.
ASKER CERTIFIED SOLUTION
Avatar of Scott Lamond
Scott Lamond
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's working at about 95%.