- Local time
- Today, 15:35
- Joined
- Feb 19, 2002
- Messages
- 46,883
There are two macros I have in every application and I don't use macros for anything else.
mSetWarningsOff
mSetWarningsOn
The reason I use macros to toggle warnings is because it is EXTREMELY dangerous to leave warnings off accidentally. You could easily loose hours of work if you closed an object without explicitly saving it first, having warnings off would suppress the "do you want to save?" message and Access would silently discard your changes. This is only a problem when you are testing. If you stop the code in the section between the Off and On, the Warnings are Off but having the Hourglass on reminds you that warnings are off so you can immediately turn them back on.
Each macro has two commands. The "off" turns Warnings Off and the Hourglass On and the "on" turns Warnings On and the Hourglass Off.
Having the Hourglass on is sufficiently annoying that you know you need to turn it off. Using macros rather than code gives you an easy place to turn the warnings back on by running the "On" macro.
mSetWarningsOff
mSetWarningsOn
The reason I use macros to toggle warnings is because it is EXTREMELY dangerous to leave warnings off accidentally. You could easily loose hours of work if you closed an object without explicitly saving it first, having warnings off would suppress the "do you want to save?" message and Access would silently discard your changes. This is only a problem when you are testing. If you stop the code in the section between the Off and On, the Warnings are Off but having the Hourglass on reminds you that warnings are off so you can immediately turn them back on.
Each macro has two commands. The "off" turns Warnings Off and the Hourglass On and the "on" turns Warnings On and the Hourglass Off.
Having the Hourglass on is sufficiently annoying that you know you need to turn it off. Using macros rather than code gives you an easy place to turn the warnings back on by running the "On" macro.