Results 1 to 11 of 11
  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: Access 2000 Runtime crashes on events.

    When starting my mdb in Access 2000 runtime, it gives me the following error when an event occurs (button_click, timer_event, e.t.c).

    Execution of this application has stopped due to a run-time error.
    The application can't continue and will be shut down.

    Any ideas? Works fine in Access 2000 full version.

  2. #2
    Join Date
    Feb 2004
    Posts
    142
    In a run-time version every error must be trapped and handled in some way. If you have no error handling in a sub and it hits an error then the app will crash.

    The best thing to do is check all your code and if you do not have an error handler then place at least an generic one in the sub

    example
    Top of sub - On Error Goto err_Handler
    End of current sub
    exit sub - after last line of code
    err_Handler:
    msgbox err.description,vbInformation,"Error (and some descriptor to ID the code or sub to help developer find the problem if it recurs)

    If the sub is critical to the operation then you have at least do a graceful shutdown.
    KC

  3. #3
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Your application is not "crashing." It is doing exactly what is was told to do.

    You've got an error somewhere, and in the runtime environment, errors are handled in a less-than-friendly manner, unless you plan for them.

    Are you running this in runtime mode on the exact same machine that you are running it in the "open" Access environment ?

    Beside the default Access code references (Modules>>Tools>>References), are you referencing anything other than stock ?

    Do any of the forms in the application work, or is it just some forms.

  4. #4
    Join Date
    Mar 2004
    Posts
    3
    Originally posted by AZ KC
    In a run-time version every error must be trapped and handled in some way. If you have no error handling in a sub and it hits an error then the app will crash.
    The error trapping is in place. On opening a form is launced with a command button and some text by autoexec macro. Now the moment I click the button Access gives me the above error. It even dosen't get to the code execution behind this button at all. Checked this by placeing only a msgbox call with error trapping to button_click event.

    Originally posted by PracticalProgram
    Are you running this in runtime mode on the exact same machine that you are running it in the "open" Access environment ?
    Nope, I'm launching it on a seperate machine with Access 2000 runtime installed. Have installed updates for the Acces 2000 runtime, they didn't help either.

    Originally posted by PracticalProgram
    Beside the default Access code references (Modules>>Tools>>References), are you referencing anything other than stock ?
    I'm referencing beside the stock to some activeX controls and they are all installed. Have cheked this over and over again.

    Originally posted by PracticalProgram
    Do any of the forms in the application work, or is it just some forms.
    Same problem with all the forms.
    Last edited by ShadowKnight; 03-26-04 at 02:53.

  5. #5
    Join Date
    Mar 2004
    Posts
    3
    [i]
    Are you running this in runtime mode on the exact same machine that you are running it in the "open" Access environment ?
    Have tried it now and it works fine in runtime mode on the machine with "open" Access enviroment.

  6. #6
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    "Have tried it now and it works fine in runtime mode on the machine with "open" Access enviroment"

    That says that that other machine is not set up with the same configuration as your original machine.

    Even though you may have checked the other machine many times, you're missing something.

    Are you using activex controls on all your forms?

    Sounds like your activex control is just not properly installed--they are sometimes very sensitive.

  7. #7
    Join Date
    Apr 2004
    Posts
    4
    I made an application in Access 2000 and have similar problems. Everything works just fine using the full version, but there are all kinds of functions run-time does not handle well. The way run-time deals with dates is a lot less fexible and run-time can't even execute simple stringfunctions such as left().

  8. #8
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    "run-time can't even execute simple stringfunctions such as left()."

    Not true.

    There are very, very few differences between the run-time and the full environment.

    The left() problem you describe is due to a defective reference to the DAO library.
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  9. #9
    Join Date
    Apr 2004
    Posts
    4
    "The left() problem you describe is due to a defective reference to the DAO library."

    Oops. Do you know how that can be fixed then?
    Joost

  10. #10
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    The way I have repaired it is to:

    do a repair and compact (holding down the shift key the ENTIRE time to prevent launching of the application).

    drop the DAO reference.

    exit the application.

    launch the application with the decompile option (holding down the shift key the ENTIRE time to prevent launching of the application).

    re-assert the DAO reference

    do a complete compile
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  11. #11
    Join Date
    Apr 2004
    Posts
    4
    Cheers! I'll try that, then. It's been driving me up the wall sofar.
    Joost

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •