Access 2003 Form Corruption

D

David G.

I am working on an Access 2003 database. In the last 2 days I've had
Access corrupt 2 forms rendering them unloadable. (I would get the not
enough memory error message.) I had to scrap the one form entirely
since I had not backed up the database since creating the form. (Lots
of saves, but that doesn't help.) Fortunately, I had backed up the
database before doing some heavy edits to the form. I used the export
feature to copy the working form into the current database file.

I set up a VM on my XP machine so I could install the Office 2003
software and not worry about any conflicts with my Office 2007. Are
there any known issues with Microsoft Virtual PC and Access 2003? Are
there other issues I should investigate to prevent this from happening
in the future? The "Compact and Repair" feature in 2003 seems useless.
Are there other methods for fixing a corrupted form?

Thanks for any comments.
THANKS!
David G.
 
T

Tony Toews

I get this occasionally as well.
I set up a VM on my XP machine so I could install the Office 2003
software and not worry about any conflicts with my Office 2007. Are
there any known issues with Microsoft Virtual PC and Access 2003?
No.

Are
there other issues I should investigate to prevent this from happening
in the future?

Not tthat I'm aware of.
The "Compact and Repair" feature in 2003 seems useless.

In the case of objects other than tables, indexes and relationships
you are correct. To fix the other objects you must either copy and
paste from the database container window or import all the objects
into a new database file.

Corrupt Objects within a Corrupt Microsoft Access MDB
http://www.granite.ab.ca/access/corruption/corruptobjects.htm

The little documented SaveAsText and LoadFromText may help if an
object is corrupted or otherwise behaving weirdly.
At the debug/immediate window type:
Application.SaveAsText acForm,"MyForm","c:\form.txt
You can load the file into a new MDB.
Application.LoadFromText acForm,"MyForm","c:\from.txt"

Sample code at http://www.datastrat.com/Code/DocDatabase.txt for
saving all objects in an MDB.

Tony
 
T

Tony Toews

I am running Office 2003 on VMWare on one machine without problems. Do you
have SP1 and SP2 installed as well?

Good point but Office 2003 is up to SP3.

Tony
 
D

David G.

Thank you for your comments! I might go back to one of the corrupted
files and see if I can extract the corrupted form.
I get this occasionally as well.


Not tthat I'm aware of.


In the case of objects other than tables, indexes and relationships
you are correct. To fix the other objects you must either copy and
paste from the database container window or import all the objects
into a new database file.

Corrupt Objects within a Corrupt Microsoft Access MDB
http://www.granite.ab.ca/access/corruption/corruptobjects.htm

The little documented SaveAsText and LoadFromText may help if an
object is corrupted or otherwise behaving weirdly.
At the debug/immediate window type:
Application.SaveAsText acForm,"MyForm","c:\form.txt
You can load the file into a new MDB.
Application.LoadFromText acForm,"MyForm","c:\from.txt"

Sample code at http://www.datastrat.com/Code/DocDatabase.txt for
saving all objects in an MDB.

Tony
THANKS!
David G.
 
D

David G.

I keep XP up to date. I tried to install Office SP3, but I got a
message saying it was already installed. I know I installed the
updates previously, but I had assumed reinstalling from the original
disc would have taken me back to square one. Perhaps the installation
process does not overwrite any newer version files?

Is there a way to uninstall the updates, or reinstall them?
Good point but Office 2003 is up to SP3.

Tony
THANKS!
David G.
 
T

Tony Toews

I keep XP up to date. I tried to install Office SP3, but I got a
message saying it was already installed. I know I installed the
updates previously, but I had assumed reinstalling from the original
disc would have taken me back to square one. Perhaps the installation
process does not overwrite any newer version files?

Is there a way to uninstall the updates, or reinstall them?

Likely from within the Control Panel >> Add/Remove softeare but
you'll have to click that checkbox to show the patches. Be prepared
to wait a while for it to update the screen.

Tony
 
D

David W. Fenton

I am working on an Access 2003 database. In the last 2 days I've
had Access corrupt 2 forms rendering them unloadable.

Are you practicing good code management?

That is:

1. turn off COMPILE ON DEMAND.

2. use Option Explicit in all modules.

3. specify the parents of all objects used (Me!MyFormControl and not
MyFormControl).

4. compile often (after every few lines of code).

5. decompile on a semi-regular basis (after a few hours of work,
before a release to production).

These kinds of daily practices generally reduce the occurence of
corruption to almost never.
 
D

David W. Fenton

I know I installed the
updates previously, but I had assumed reinstalling from the
original disc would have taken me back to square one. Perhaps the
installation process does not overwrite any newer version files

No, it does not. That was one of the main points in creating the
MSI, to manage this kind of thing. To revert to the earlier version,
you have to uninstall and reinstall from the source disks.
 
D

David W. Fenton

I use Me. Haven't yet had a problem with that.

I see a lot of code that doesn't specify parent objects, though. It
requires VBA to do more work, as well as causing the *programmer* to
do more work ("is MyFormControl a variable or is it a control on
this form?"). I think it's a good idea to not depend on implicit
behaviors any more than necessary, particular when being explicit
makes for better code.
 
T

Tony Toews

I see a lot of code that doesn't specify parent objects, though. It
requires VBA to do more work, as well as causing the *programmer* to
do more work ("is MyFormControl a variable or is it a control on
this form?"). I think it's a good idea to not depend on implicit
behaviors any more than necessary, particular when being explicit
makes for better code.

Agreed. And it saves time typing as Intellisense takes over after
the first few characters.

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top