Try a decompile.
Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\m saccess.exe" /decompile
"c:\MyPath\MyDa tabase.mdb"
Then compact the database:
Tools | Database Utilities | Compact
If that does not solve the problem, copy the code from the form's module
out to a text file and save it. Then set the form's HasModule property to
No, so it loses the code. Compact the database. Then export the form itself
to a text file with this undocumented command:
SaveAsText acForm, "Form1", "C:\Form1.t xt"
Delete the form. Compact again.
Then import the form with:
LoadFromText acForm, "Form1", "C:\Form1.t xt"
The paste in the code, and try a Compile All.
If it's still stuck after this, is there any code in the form that alters
its RecordSource or writes the SQL of its source query? If so, or you have
any code that refers to a field in the form's RecordSource that is not also
the name of a control on the form, try using a bang instead of a dot when
referring to that field in your code.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"MLH" <CR**@NorthStat e.net> wrote in message
news:hu******** *************** *********@4ax.c om...
A97 aborts creation of MDE reporting that there's a compile
error in one form. Sure enough, if I remove the form from the
source database and attempt to compile the MDE, it succeeds.
But when I open the source MDB file and the form's class
module, click Debug, Compile Loaded Modules - no compile
time error is reported. What is the MDE doing to find a compile
time error that Debug/Compile Loaded Modules is not?
If you've encountered and overcame this obstacle in the past,
what did you determine to be the culprit?