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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database won't open 2

Status
Not open for further replies.

bernie10

Technical User
Sep 13, 2004
219
US
Hello everyone,
I have a database that I've been working on that won't open anymore. Everytime I try and open it I immediately (before the main form is able to open) get an error that Access has encountered an error and has to close. What could be causing this? What can I do to fix this? I have tried opening it on several different computers and get the same error. Please help!!!

Thanks,
Collen
 
Have you tried to open the database holding the Shift key depressed ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
My guess is corruption, though I can't be sure.

This faq Corrupt Microsoft Access MDBs FAQ has a lot of info concerning corruption, symptoms and how to deal with it. MakeItSo's FAQ705-4683 also has some recommandations.

During the last years, I've resolved all my code corruption issues using the /decompile option, in stead of importing objects. It's described here Decompile or how to reduce Microsoft Access MDB/MDE size and decrease start-up times

There's of course alse the possibility of going back to the latest backup, but chances are, the there might be some corruption (if it is corruption) in that too.

Roy-Vidar
 
Thanks to both of you!

PH, holding the shift key and opening the file did allow the DB to open without error. I then attempted to open my main form (which would normally open on startup) and got the same error. I assume this implies the problem is with my startup form?

RoyVidar, I read through the resources you suggested. Please see below- does this still sound like corruption?

Since the problem appeared to be with my main form opening, I figured there may be a problem with the code in the "On Open" event. Since there was only a little code there, I tried commenting out each line to figure out which line of code was causing the problem. I was not able to zero in on a particular line, but when I uncommented each of the lines the form and the whole DB began opening fine. I didn't change any code or fix any errors; I merely commented each line and then uncommented them.

Does this behavior make any sense? Does anybody have any thoughts on this? Should I assume that my problem is resolved or will the problem likely come back?

Thanks for all the help.

Collen
 
Theres a textual representation of the code, which we are working with. This never (or at least very close to never) corrupts.

Then there's the compiled code, which can become corrupted.

Now the opinions and view part...

Changing the textual representation may perhaps address some issues of curruption by altering parts of the compiled code, but I'd never dare to rely upon it.

Your symptoms, to me, indicate some kind of code corruption (the compiled parts), which is probably still present, lurking, and "attacking again" at the least convenient time.

The Microsoft suggestion, is to copy objects to a new database. Alternatively, first copy the textual representation of the code to text files, then set the has module property of forms and reports to no, then copy the objects to a new database. Then copy all the code and reattach the event handlers... - now that's a big ugly piece of work, and the /decompile option, in most cases does the same through the prescribed steps.

For the fun of it, why not keep two copies. One unaltered, and one on which you perform /decompile, put them both in use, and see what happens...

Some more info can be found for instance
Roy-Vidar
 
Alright thanks for all the help. I've tried the decompile option and the DB appears to be acting okay. I'll keep my fingers crossed. Thanks again.

Collen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top