?
Solved

Access Crashing When View Code

Posted on 2003-11-20
9
Medium Priority
?
251 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 1

Assisted Solution

by:cityside
cityside earned 160 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 160 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 180 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Suggested Courses

741 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