Disable all error messages (1 Viewer)

stu_c

Registered User.
Local time
Today, 10:52
Joined
Sep 20, 2007
Messages
489
Hi all,
In my Access DB, I have a User mode which hides all Nav / Tool bars, disables right click etc
I also have a way to enable developer mode which enables all the above (only people with certain access can do this).

What I am looking to do is when the user mode is active no error messages show up how is the best way to do this?
I have seen the code but would this work?

Code:
DoCmd.SetWarnings False

I have a menu form that always stays open on the tabs when the user logs in automatically opens but if I put this to run on this menu would this disable for the whole database or just from that form?
 

Minty

AWF VIP
Local time
Today, 10:52
Joined
Jul 26, 2013
Messages
10,371
I believe that supresses messages for the whole database, including record deletes, deleting a form etc. etc.
So, it's pretty dangerous thing to do IMHO.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 17:52
Joined
May 7, 2009
Messages
19,243
you should have a "Logging" error routine that silently dump any errors to a table or silently debug.print it.
then each VBA code should have and Error handler to redirect to this routine whenever an error occurs.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 05:52
Joined
Apr 27, 2015
Messages
6,341
Very dangerous thing to do, ignoring errors. Great way to skew your data and corrupt your db. Watch this video for some ideas:

 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 05:52
Joined
Feb 19, 2002
Messages
43,275
What I am looking to do is when the user mode is active no error messages show up
That is not a rational objective. The objective should be to trap errors and either ignore them if they are irrelevant or rephrase them to something clear for the user.
 

Users who are viewing this thread

Top Bottom