By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

Cannot create MDE

P: n/a

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.

thanks

Colin
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ColinWard <je*********@hotmail.com> wrote in
news:40*********************@news.frii.net:
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.

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
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.