Solved

Access Crashing When View Code

Posted on 2003-11-20
9
248 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
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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

821 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