Is it possible to customize an error message?

A

azu_daioh

Is there a way to change one of the default error messages such as
this one:

"You or another user may have unexpectedly quit Microsoft Office
Access while a Microsoft Office Access database was open.
Do you want Microsoft Office Access to attempt to repair the
database"


Basically, I just want to add something to the
above error message. The error message appears @ startup.


Any help is greatly appreciated.


Thank you,


Sharon
 
J

John W. Vinson

Is there a way to change one of the default error messages such as
this one:

"You or another user may have unexpectedly quit Microsoft Office
Access while a Microsoft Office Access database was open.
Do you want Microsoft Office Access to attempt to repair the
database"


Basically, I just want to add something to the
above error message. The error message appears @ startup.

That would be like putting a bandaid on a compound fracture.

You REALLY REALLY need to find out why the database is being closed in this
way, and put a stop to it. You're very lucky that you haven't irreversibly
corrupted the database beyond all repair!

To answer the question, though, you can put code in the startup form's On
Error event to trap the error and issue your own message, such as

MsgBox "Some idiot rebooted while Access was open. If it was you DON'T!"

or more diplomatic prose if you wish...
 
L

Larry Linson

John W. Vinson said:
To answer the question, though, you can put code in
the startup form's On Error event to trap the error and
issue your own message, such as

MsgBox "Some idiot rebooted while Access was open.
If it was you DON'T!"

or more diplomatic prose if you wish...

As you, no doubt, perceive, the Wysard's other specialty is "appropriate
language for the circumstances". <GRIN>

On the other hand, I am not certain that the error message you describe can
be "intercepted" by an On Error in the startup form -- Access may not get
that far in the loading process before issuing the error message.

Larry Linson
Microsoft Office Access MVP
 
A

azu_daioh

That would be like putting a bandaid on a compound fracture.

You REALLY REALLY need to find out why the database is being closed in this
way, and put a stop to it. You're very lucky that you haven't irreversibly
corrupted the database beyond all repair!

To answer the question, though, you can put code in the startup form's On
Error event to trap the error and issue your own message, such as

MsgBox "Some idiot rebooted while Access was open. If it was you DON'T!"

or more diplomatic prose if you wish...


Thank you. I actually want to say something like that...my manager
agreed but we have to be PC.
Due to several limitations we have at work, we don't have much choice
but to use a shared DB. We're on our own on this, IT refused to
provide Access or any DB support. Very unfortunate.
 

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