The biggest problem is forgetting to turn them back on before all possible "exits", as you code will just silently fail., and you won't have a clue why.
Your better off to use a simple error handler and/or currentdb.execute for action queries to suppress any need for the messages to appear in the first place.