Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Access has encountered a problem message

Status
Not open for further replies.

PJname

MIS
Jun 15, 2004
73
0
0
US
I have a MS Access database that I have set up to automatically run using the Scheduled Tasks application at certain time early in the mornings using the Autoexec Macro in the Access database.

Sometimes when I login to my machine the next morning, it shows the following Microsoft Access box:

Microsoft Access has encountered a problem and needs to close. We are sorry for the inconvenience.

The information you were working on might be lost. Microsoft Access can try to compact and repair your open database.

..... Repair my open database and restart Microsoft Access

Send Error Report Don't Send


As far as I can tell, this box appears after it has completed running my job from the Access Database.

Is there a way to prevent this box from appearing?

Because if I set up the job to run on weekends and receive this error, the job will not run the next day because it is waiting for a response and prevents from running the MS Access job scheduled.
 
That looks like a Windows error message, so you will probably have to fix the underlying problem rather than suppress it.

Are the tables pointing to a back-end server of some type, like SQL Server? Perhaps that server is getting restarted (or the SQL Service is getting restarted) at night.
 
It's an error message that occurs when the msaccess.exe process crashes.

I've seen in when there are corruptions of database objects including controls on forms and querydefs. I'd guess it can also happen as a result of a corrupt Access installation. Unfortunately it can be a real pain to find the cause of it, especially if it's occurring in a long overnight process.

You can't trap the error, as it's not a VB runtime error, and it can't be surpressed. You'll need to find the underlying cause and fix it.

Ed Metcalfe.

Please do not feed the trolls.....
 
PJName,

I would back up the MDB before trying this:

Have you tried running a "Compact and Repair Database" (under "Tools", "Database Utilities" and doing a decompile?

To do a "decompile":

1) go to a DOS prompt and type:

"<path to Access>\msaccess.exe" "<Path>\<Filename>.mdb" /decompile

...just put your own paths and filenames.

2) Go back into the MDB in design mode and recompile.

I have found MDB's do some strange things when they need to be decompiled.

 
Don't know if this helps or not....

I have a PC with an always running Access Program... Issues it had were similiar to yours or bloated to point of no return.

What I did to ensure that it would run the next day is:

Put Code on a timer to Exit the MS Access program at a certain time (really not necessary, but better for it to shut down normal, then being cut off by a computer restart, in case of linked backend files etc...).

I have Task Scheduler run a batch file to Shut down and restart the computer at a certain time in the morning using commands to "kill" any proceses that hang waiting on a keyboard response.

I installed the Microsoft Power Toys to automatically log on the computer.

In the Start Up, I have it run a batch file that copies over a "Master" Copy of the Database over the top of the Database Name that runs all the time, and the batch file also starts the Database to Run.

If Security is an issue, you can also have the batch file run a script that Locks the Work Station after so many seconds of the logon.

Hope this helps.

Thanks,
John


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top