Solved

Access Crashing When View Code

Posted on 2003-11-20
9
249 Views
Last Modified: 2010-05-18
Hi

I have an Access 97 Application and 1 of my forms seems to have become corrupted.  I can view the code module of all of the other forms but when I try to the view the code of the problem form, the application quits.  I tried to import the form into another DB and it won't do that either.  Any ideas?

Thanks

rthomsen
0
Comment
Question by:rthomsen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 32

Expert Comment

by:jadedata
ID: 9789661
Hey rthomsen!

  I hope you have an older copy of the form in a backup mdb.  It appears it is hopelessly corrupted.

regards
Jack
0
 
LVL 2

Author Comment

by:rthomsen
ID: 9789669
Any idea how this may have occurred?
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9789706
This is something Access developers get used to and plan for by maintaining a vigorous backup agenda.

I periodically (daily or better during development) import all Forms/Reports/Modules to a separate backup to keep the coded object backup.
A full backup is done regularly

During developement periods,...CRSCRSCRSCRS
 (compact repair SAVE compact repair SAVE compact repair SAVE compact repair SAVE)

The heavier I'm hammering code and object, the move often I run the backups.

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Assisted Solution

by:cityside
cityside earned 40 total points
ID: 9790252
Try creating a new blank database and then importing all the stuff from the corrupted one
Regards
JohnR
0
 
LVL 2

Assisted Solution

by:jack49a
jack49a earned 40 total points
ID: 9790570
I had a similar problem recently.  My database has a few tables containing data which are updated and it was the modules that seemed to get corrupted.  The data tables seemed to be OK.  So I found an old back-up with working modules, deleted the data tables, and then copied the up-to-date data tables to the older database.

So if your case is similar, and you have an old backup with the form working OK, you can either follow my route or delete the corrupt from from the current database and then copy a working copy into the database. Maybe someone here has an oprinion as to the best route.   In either case a compact and repair is in order.



Jack49a
0
 
LVL 2

Author Comment

by:rthomsen
ID: 9790647
Ok...this is the weirdest thing ever.

Every time I clicked the code menu button or view->Code in the access menu, access would crash.

But...I right clicked on the form and selected Build Event.... and chose the Code Builder and I was able to gain access to the code and now everything seems to be fine.  I saved and did a compact and repair and now I'm going to create a backup.

Thanks for your suggestions.

rthomsen
0
 
LVL 32

Accepted Solution

by:
jadedata earned 45 total points
ID: 9790735
Sometimes compiling the code will help you turn up something that is causing an error by reference. (gremblins)  A correction in a global procedure can resolve the issues and the crashing goes away.  (BUT BACKUP ANYWAYS AT THAT POINT>>>)
0
 
LVL 2

Author Comment

by:rthomsen
ID: 9790795
Even though It worked itself out, I just split the points between everyone who attempted to help.

Thanks

rthomsen
0
 
LVL 32

Expert Comment

by:jadedata
ID: 9790807
But we let you know you are not alone in the world of database corruption!
I hope we all still provided a little extra to think about for the next occurrance.

thanx for the question!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question