MS Access Runtime closes database when there is a mirror error. How to ignore? (1 Viewer)

minimen456

New member
Local time
Today, 15:05
Joined
Dec 8, 2022
Messages
2
There is a MS Access Database. Sometimes there are pop ups errors: "The value you entered isn't valied for this field" and then a Macro error. But that's OK, I just click "Stop All Macros" and give it another try.

But with MS Access 2016 Runtime it's different. The database just closes. How to make it behave the same way as full MS Access 2016? I don't want to database being closed when there is a minor error.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:05
Joined
May 7, 2009
Messages
19,245
it's runtime so you have no control of it.
make sure that all your code is working before
converting it to runtime.
 

Minty

AWF VIP
Local time
Today, 15:05
Joined
Jul 26, 2013
Messages
10,371
You have to handle all errors to avoid a runtime database closing.
So in your case above you need to validate the entries before saving the record to avoid the error being raised.
Use the forms before update event, or use a combo box to restrict the end users entries. There is an excellent video here:
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 15:05
Joined
Sep 12, 2006
Messages
15,658
There is a MS Access Database. Sometimes there are pop ups errors: "The value you entered isn't valied for this field" and then a Macro error. But that's OK, I just click "Stop All Macros" and give it another try.

Your process is still failing when this happens. When you stop all macros, you might be introducing other errors. It depends what happened before, and what was supposed to happen after the failed step. With runtime any error just crashes your programme. That's the difference.

As others have said, you need to include error handling, and data validation so that you can't get any errors of this nature.
 

Users who are viewing this thread

Top Bottom