Scott Lamond
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?
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?
Is it VBA code running in Access or is it VB.NET code?
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\Of fice\14.0\ Access\Res iliency\Di sabledItem s
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]
I think you'll find the disabled items list in the registry at this key:
HKCU\Software\Microsoft\Of
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]
ASKER
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.
S.
ASKER
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("WScr ipt.Shell" )
WSHShell.RegDelete "HKCU\Software\Microsoft\O ffice\14.0 \Access\Re siliency\D isabledIte ms" ------ <<< make this specific for you cirsumtances!!!!
set WSHShell = nothing
Dim WSHShell
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScr
WSHShell.RegDelete "HKCU\Software\Microsoft\O
set WSHShell = nothing
You may want to find out what error Access is reporting before you hide the fact that an error happened.
ASKER
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.
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.
Based on the above comment, can you make sure that the Database Option "Compact on Close" is NOT checked.
ASKER
That option is not selected.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's working at about 95%.