The Decompile switch was undocumented in earlier versions of Access, but has
been documented for 3 versions now.
Decompiling may not give the same results as importing into a new database.
In an mdb file, there are 2 copies of the code:
- a text version (what you view and edit);
- a compiled version (what actually runs).
If the database corrupts, these 2 may differ.
Decompiling discards the compiled version.
It then recreates the compiled code from the text version.
The inconsistency is then gone.
If you import from one mdb into a new file, using the same version, Access
may import both the text version and the compiled version exactly as they
were. If the two copies were inconsistent, the new version can therefore
still have the inconsistency. This is not common, but it does happen.
So, the safest procedure would be:
1. Decompile the old mdb.
2. Compact it to get rid of the space used by temp objects and the compiled
code.
3. Import into a new (blank) database. At this point you are importing only
the text version as the compiled version has been discarded.
4. Set your minimal references, and compile.
If you are still having trouble with a particular form, you may be able to
use the undocumented SaveAsText from the old database, and then LoadFromText
into the new database.
For suggestions on avoiding corruption in the first place, see:
Preventing Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-25.html