Solved

Access Crashing When View Code

Posted on 2003-11-20
9
245 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
Comment Utility
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
Comment Utility
Any idea how this may have occurred?
0
 
LVL 32

Expert Comment

by:jadedata
Comment Utility
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
 
LVL 1

Assisted Solution

by:cityside
cityside earned 40 total points
Comment Utility
Try creating a new blank database and then importing all the stuff from the corrupted one
Regards
JohnR
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 2

Assisted Solution

by:jack49a
jack49a earned 40 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now