Problems 'compileing' Access file

D

Damir Dezeljin

Hi.

I'm using Microsoft Office Access 2003 (11.6355.6408) SP1.

I wrote a simple form application to take track of my expenses. Whenever
I try to compile it into an MDE file, I get and error:
----
Microsoft Office Access was unable to create an MDE database.
----

The 'Show Help' button opens a dialog box telling that the problem may
be caused by number of opened tables IDs. However this is improbably as
my Access database consists of 3 nearly empty normalized small tables
and four simple forms. There are one_to_many relations defined between
tables too.

Heh … it is a little bit funny that MS Access gives up on such a simple
task ;)

Does anyone have a suggestion how can I solve my problem? I hope I don’t
have to rewrite the application in a different programming environment
as I don’t have lot of time!

Thanks and best regards,
Dezo
 
T

Tom Wickerath

Hi Dezo,

Please see the following checklist:

How to determine why Access is unable to create an MDE database.
http://www.access.qbuilt.com/html/conversion.html#CannotMakeMDE


Tom
______________________________________

:

Hi.

I'm using Microsoft Office Access 2003 (11.6355.6408) SP1.

I wrote a simple form application to take track of my expenses. Whenever
I try to compile it into an MDE file, I get and error:
----
Microsoft Office Access was unable to create an MDE database.
----

The 'Show Help' button opens a dialog box telling that the problem may
be caused by number of opened tables IDs. However this is improbably as
my Access database consists of 3 nearly empty normalized small tables
and four simple forms. There are one_to_many relations defined between
tables too.

Heh … it is a little bit funny that MS Access gives up on such a simple
task ;)

Does anyone have a suggestion how can I solve my problem? I hope I don’t
have to rewrite the application in a different programming environment
as I don’t have lot of time!

Thanks and best regards,
Dezo
 
A

Albert D. Kallal

You need understand that before you create a mde, your code has to run.
There is a option while looking at code:


debug->compile

You should as a normal process during the development phase use the debug->
compile option to find errors in your code.

Remember, the compile option is a option that converts your "text", or so
called sauce code into a machine code (in this case p-code) that the
computer can run. You can't create a mde file (which is for end users...the
final step before deployment) unless your code compiles.
Heh . it is a little bit funny that MS Access gives up on such a simple
task ;)

Once you learn and understand the concept of compiling code, and using the
compile option, then it will all make sense. Note that compiling is a
differnt step then that of making a mde (which simply strips out the souce
code). You don't want to develop an application, and type in lots and lots
of code, and then after weeks and weeks all of a sudden try to make the mde
file.

So, will over time learn to use the compile option to ensure that you code
can be compiled.

If you can get your code to compile first..then likely the making of the mde
should work.

Once you start to make use of the compile option a habit, then you will find
the deveopment process goes a lot better.

Good luck.
 
D

Damir Dezeljin

Hi.

Thanks for good hints. I will try.

BTW: I supposed that Access would told me if there is a sematic problem
with my code when I close (save) the function. Heh ... maybe I'm too
much an C and similar langauges programer ;)

I will check the code ... thanks and best regards,
Dezo
 
T

Tom Wickerath

One of the most important things that you should do, besides getting in the
habit of frequently compiling your code, is to set the option "Require
variable declaration". See the following gem tip here:

http://www.access.qbuilt.com/html/gem_tips.html#VBEOptions

Also important is to disambiguate your declarations:

ADO and DAO Library References in Access Databases
http://www.access.qbuilt.com/html/gem_tips1.html

and to avoid the use of reserved words:

Reserved Words in Microsoft Access
http://support.microsoft.com/?id=286335

List of reserved words in Jet 4.0
http://support.microsoft.com/?id=321266

Might as well adopt a naming convention while you're at it. It will help
save you from headaches in the future:

Special characters that you must avoid when you work with Access databases
http://support.microsoft.com/?id=826763

Commonly used naming conventions
http://www.mvps.org/access/general/gen0012.htm
http://www.xoc.net/standards/default.asp

Using a Naming Convention
http://msdn.microsoft.com/library/d...us/odeopg/html/deconusingnamingconvention.asp

Oh, and you probably want to disable Name Autocorrect on all of your
databases:
Failures caused by Name Auto-Correct
http://allenbrowne.com/bug-03.html

Finally, make sure that you have all the latest service packs for your
operating system, your version of Office, and the JET database engine. The
following KB article provides the information you need to do this:

How to keep a Jet 4.0 database in top working condition
http://support.microsoft.com/kb/303528/EN-US/


Tom
______________________________________

:

Hi.

Thanks for good hints. I will try.

BTW: I supposed that Access would told me if there is a sematic problem
with my code when I close (save) the function. Heh ... maybe I'm too
much an C and similar langauges programer ;)

I will check the code ... thanks and best regards,
Dezo
 
A

Albert D. Kallal

Damir Dezeljin said:
Hi.

Thanks for good hints. I will try.

BTW: I supposed that Access would told me if there is a sematic problem
with my code when I close (save) the function.

Actually, you are somewhat correct in the above. So, do note that syntax is
checked as you type in code. However, a good many additional errors in your
code will not be based on incorrect syntax, but simply errors. A great
example is if you have a "if" without a corresponding "end if". When you
compile, these types of errors are not syntax, but in fact is still broken
code that the compiler will find.

So, inteli-sense (auto complete) does help, and sure, the syntax checking as
you type also helps, but compiling still finds a lot more errors that go
beyond syntax.

When I am in the code editor and just typed in some code, I will instantly
hit ctrl-s (to save the code). and then go alt-d, and then hit the enter
key.

So,
ctrl-s - saves my code (very good thing to do)
alt-d, (let go of alt d), and then hit enter key compiles my code...

The above 3 key strokes occur very fast..and in fact I now don't even
realize that I am doing it any more as I do it so often without thinking..
 

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