ColinWard <jetfighter3@hotmail.com> wrote in
news:403680c1$0$195$75868355@news.frii.net:
[color=blue]
> Hi there. I just tried to create an MDE from an Access XP App but
> it crashed out and gave me the "Microsoft Access has encountered a
> problem and needs to close" message. Has anyone seen this? I tried
> a compact and repair before creating the MDE but no luck.[/color]
Try a decompile beforehand.
Go to the START menu and choose RUN.
Browse for the MS Access executable.
Add after the end of it /decompile. It will look something like
this:
"C:\Program Files\Office\MsAccess.exe" /decompile
(you might want to save that as a shortcut, since decompiling is
something that you may need to do again)
Then run what you've got there, and open the problematic MDB file.
You may see a message about code being converted (but probably not).
Close the instance of Access and open Access normally.
Open your MDB.
Compact it.
Now, open a module and from the DEBUG menu, choose COMPILE.
You may encounter a compile error here. Fix that before you
continue.
Once you've successfully compiled, compact again.
Now, attempt your conversion to MDE.
What's all this about?
Well, an MDE is an Access database with all its code modules
compiled with no actual code left, so for that to work, the code has
to be compilable and in good condition with no corruption.
The decompile switch discards *all* compiled code (which doesn't
happen via any other method) leaving only the canonical code (the
part you typed).
The compact after the decompile permanently discards the data pages
that were previously occupied by the compiled code.
When you compile again after that compact, you're compiling
everything at once from the canonical code and this will often fulsh
out problems that were not previously evident.
These kinds of problems happen when you've got COMPILE ON DEMAND
turned on, and code is compiled as needed, as opposed to when you
tell it to be compiled. This can lead to problems. Why? Well,
there's a great explanation of it here:
http://trigeminal.com/usenet/usenet004.asp
To avoid problems like this in the future, turn off COMPILE ON
DEMAND for good, and decompile and compact and recompile and compact
before attempting to create a new MDE.
--
David W. Fenton
http://www.bway.net/~dfenton
dfenton at bway dot net
http://www.bway.net/~dfassoc