PDA

View Full Version : [SOLVED:] Can a "warning" message be disabled?



Kicker
10-09-2017, 08:46 AM
I have a program I am writing for a club I belong to. One of the routines needs to run a delete query to empty a table and then a set of vba code to add the records back based on a set of criteria. It is working really great. However,

Every time the delete query is run, I get the message "You are about to delete ***x records...." I would prefer that the user did not have to click on "Yes" to continue. Is there anyway to eliminate or disable the message?

jonh
10-09-2017, 09:38 AM
currentdb.execute "queryname"

OBP
10-09-2017, 09:40 AM
You can turn off System Messages with
DoCmd.SetWarnings False
and back on again with
DoCmd.SetWarnings True

Kicker
10-09-2017, 09:55 AM
that is why I love this forum. Thanks guys I appreciate your quick response.