Problems with different versions of Access

R

Rick Brandt

ByB said:
Hello,

I am working on a VBA Access pplication which connects to a SQL Server
database.
I have a continuous form displayed with data, ad it is linked to a
database table, so when I enter a value from my form the data in
instantaneously updated in the database.

The problem I have is that this form works perfectly when I am
developping, and using my developpement environement (with Access
allowing me to set breakpoints, go step by step in the code and so
on), but it does not work when I use it in the PC of the ending user
: in this case, when I enter a value in the form, and click in
another part of the form, it crashes immediately. Note that my ending
user has a version of Access which does not allow entering or
modifying the code, but just executing my application as a MDE
project.
So I made several tests, and the conclusion is that with a version of
Access which allows access to the VBA code (developpement version),
the form works (in MDB or MDE versions of the app), but not with the
version that does not give access to the code.

Is there something I should do when creating the MDE file to be sure
that it includes averything it needs to run correctly in all versions
of Access ?

What should I do to allow my MDE file to run in any version of Access
?

Thank you for any idea on this point.

First off, the "version of Access" you are describing that your user has sounds
like the runtime. That is a completely different and separate issue to using an
MDE. One can use an MDE in the fully licensed version of Access and one can use
an MDB with the runtime.

The reason I make that distinction is that it is possible for code to work in an
MDB and not in an MDE without bringing the runtime into the discussion and it is
also possible for code in an MDB that works in "full-blown" Access to not work
in the runtime. Lastly (and more likely really), is that it is possible for
code to work on one PC and not on another without the runtime or MDB/MDE being
thrown into the mix at all.

Whether the runtime, the MDE, the combination of the two, or none of those has
anything at all to do with your problem cannot be determined unless you post
exactly what your code is.

Generally speaking MDEs cannot execute code that would try to alter the design
of a code-based object or open it in design view. The runtime has some
restrictions on what you can do, but mostly from the user interface. The list
of things you cannot do with code is a pretty small list. Certainly anything to
do with saving a record should be just fine. A missing VBA reference is a
common problem when code works on one PC and not on another. Unfortunately,
that is not so easy to diagnose with an MDE or with the runtime.

You can certainly rule out the MDE factor by seeing if you have that problem
with the MDE on your development machine. If not, then you can likely dismiss
that issue. Additionally, you can launch your app from a shortcut that
specifies the /runtime command line argument for the Access executable to
simulate the runtime environment on your PC. If you don't see the same problem
then the runtime is likely not the issue.

After that I suggest posting your code. The answer might be obvious to someone
from there.
 
B

ByB

Hello,

I am working on a VBA Access pplication which connects to a SQL Server
database.
I have a continuous form displayed with data, ad it is linked to a
database table, so when I enter a value from my form the data in
instantaneously updated in the database.

The problem I have is that this form works perfectly when I am
developping, and using my developpement environement (with Access
allowing me to set breakpoints, go step by step in the code and so on),
but it does not work when I use it in the PC of the ending user : in
this case, when I enter a value in the form, and click in another part
of the form, it crashes immediately. Note that my ending user has a
version of Access which does not allow entering or modifying the code,
but just executing my application as a MDE project.

So I made several tests, and the conclusion is that with a version of
Access which allows access to the VBA code (developpement version), the
form works (in MDB or MDE versions of the app), but not with the
version that does not give access to the code.

Is there something I should do when creating the MDE file to be sure
that it includes averything it needs to run correctly in all versions
of Access ?

What should I do to allow my MDE file to run in any version of Access ?


Thank you for any idea on this point.
 
G

Guest

Before creating your MDE file be sure you have good error handling on all
your codes. Next, in the VBA window, compile your file and then go to
Tools>Options and select the General tab. In Error Trapping section select
"Break on Unhandled Errors". If "Break on All Errors" is selected this will
shut down an MDE file on any error that occurs. At least it has in my
experience.
Hope this helps.

John G
 
N

nartla

Additionally, you can launch your app from a shortcut that
specifies the /runtime command line argument for the Access executable to
simulate the runtime environment on your PC. If you don't see the same problem
then the runtime is likely not the issue.

Thank you for your answer.
Can you please tell me how to launch Access with the /runtime
argument ?
For the moment, I just double click in my MDB file to run Access. I
have been searching via Google, but did not find any example of
running Access with a parameter like this (when I try running it from
the console with MSACCESS /runtime, Access starts but asking for the
"runtime" database !)

Thank you
 
N

nartla

Additionally, you can launch your app from a shortcut that


Thank you for your answer.
Can you please tell me how to launch Access with the /runtime
argument ?
For the moment, I just double click in my MDB file to run Access. I
have been searching via Google, but did not find any example of
running Access with a parameter like this (when I try running it from
the console with MSACCESS /runtime, Access starts but asking for the
"runtime" database !)

Thank you

OK, I found the way :

MSACCESS databaseName /runtime

is the correct syntax.
 
N

nartla

OK, I found the way :

MSACCESS databaseName /runtime

is the correct syntax.- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -

Well, I tried my app by running it with the /runtime parameter, but
the bug cannot be reproduced in this way.
Does that mean that the problem does not come from the runtime ?
 
R

Rick Brandt

nartla said:
Well, I tried my app by running it with the /runtime parameter, but
the bug cannot be reproduced in this way.
Does that mean that the problem does not come from the runtime ?

Probably.

Do you have any references besides the deafult ones? That is the most
common reason for apps that work on one PC, but not another.
 

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