Access 2007 runtime-fails

G

gg

I have a perfectly good working file that I created in Ac2000 then converted
to A2007. So that I can run it on computers without Access, I installed the
runtime program for testing before issuing.

I changed my file extension to accdr and am testing on the same computer
used to make the accdb file. In runtime, when I try to open several of the
various forms or reports from the swithchboard buttons, I get notice of a run
time error and of course it shuts down.

I get no run time errors when running the same file as accdb., so where do
they come from? How do I even start trouble shooting, what do I look for?
Very frustrated -any help or hints will be greatly appreciated.
 
J

Jeanette Cunningham

Using runtime access, any unhandled errors do exactly what has happened to
you.
In an accdb file, if you get an error, access can open the debug window and
tell you there is an error.

In the runtime, instead of getting a message about the same error, the
runtime will just shutdown the database.

Where to start?
Pick one form that shuts down the runtime when you try to open it, and put
error handling on the routine that opens the form and any code routines on
the form that opens.
Try again to open that form using the rutime - you should find that you can
open that particular form without access shutting down.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
G

gg

HI Jeanette-As you say, in accdb, I should get a run time error message and
then an automatic look at the code for debugging. My problem is that it runs
fine in addcb-I get no messages, it just runs as designed. It is only in the
runtime mode that I get the error message..

I do have error code, basically the canned stuff supplied by the button
wizard for opening a form, with some opening of action qureries inserted.
 
G

gg

Hi Sylvia-I see that you posted, but there is no information. If you have
some, I would love to see it.

George
 
A

Albert D. Kallal

Remember, if you have a runtime error in he runtime, then it quits.

You have two choices:

1) put error handling everywhere.

2) turn your application into a mde, or for 2007, a accDE.

mde's, or accDE when they encounter an error in the runtime do NOT quit, nor
do any varialbes in your code get re-set.

So, another thing to try is an accDE....

Make sure you do a debug- compile in the code editor before you attempt to
create a accDE...
 
G

gg

Thanks Albert, for the quick reply. I am familiar with mde from working in
Ac2000. I need runtime because some of my new users don't have Access.

I don't get errors when I run the file as a accDB. How come I get errors
when run as accDR? I struggled and pounded on one form and found that if I
removed some onActivate code, the form opens without error. That same code
works fine in accdb. What is the usual procedure.? Do I pound through all
the code, cutting and trying, or is there some way to make those errors
signal me when running accDB
 
J

Jeanette Cunningham

As Albert suggested, if you convert your accdb to an accde first before you
change the extension to accdr, you may find that many of the errors do not
bother the accdr.
Let's know how that works for you.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
A

Alex

The reason could be in libraries, which are not presented in the computer
with the Access runtime.
Uncheck any unnesessary libraries in Modules window (Tools-References),
compile and try again.

Alex

g> I have a perfectly good working file that I created in Ac2000 then
g> converted to A2007. So that I can run it on computers without Access, I
g> installed the runtime program for testing before issuing.

g> I changed my file extension to accdr and am testing on the same
g> computer used to make the accdb file. In runtime, when I try to open
g> several of the various forms or reports from the swithchboard buttons, I
g> get notice of a run time error and of course it shuts down.

g> I get no run time errors when running the same file as accdb., so where
g> do they come from? How do I even start trouble shooting, what do I look
g> for? Very frustrated -any help or hints will be greatly appreciated.
 
G

gg

Hi and thanks for joining in Alex. I have tried everything recommended:
addde before adddr, removed all the libraries that it would let me remove
and same old same old. I had previously downloaded service pack 2. I s
there something else that I have to download?
 
J

Jeanette Cunningham

gg, were you able to create the accde successfully?
If you were, then I expect that all would work when file extension is
changed to accdr.
You have done everything correctly as far as I can tell from your posts.

I am starting to think that doing the recover from corruption steps on the
accdb before you convert it to accde and run with accdr is the next thing to
try. Especially importing all into a new accdb then convert to accde and run
with accdr.

If that doesn't help, you will need to go back to the accdb and step through
some code - why not start with one of the forms that won't open in the
runtime.
Perhaps post the code that opens that form for us to see and maybe we can
make a suggestion.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
G

gg

Jeanette, Albert, Alex-thanks for sticking with me. You folks let me know
that there was no simple canned solution and gave me things to try. The
final solution seems to be that I delete the old code, then type in the
exact same code and it works!

Some kind of corruption or an Access 2007 bug? By the way am surprised to
see that Access now seems to promote macros over code. I learned code
because I planned to someday make a runtime application-oh well. Thanks
again.
 

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