DS wrote:
God Bless You.....It works great! I stuck it before and after the other
DoCmds. And it Works.....! Thanks.
DS
DS wrote:
God Bless You.....It works great! I stuck it before and after the other
DoCmds. And it Works.....! Thanks.
DS
Be careful, though. If something does happen in the offending code
before you get to docmd.setwarnings true, and you don't have this
trapped in an on error procedure, then you could be in trouble.
Perhaps a better way is to deal with the confirmation message itself.
This is happening on a form, right? And the form is bound to a table?
Here's a good way to find out what is happening.
In your form properties is an event called "Before Delete Confirm".
Click the builder button and go to the VBA window and type in the following:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
'No confirmation message on delete, so set response to:
Response = acDataErrContinue
End Sub
This is a much, much safer way of doing this. It is a good idea to
avoid docmd.setwarnings false and there are a lot of alternative ways
for various procedures to ensure no confirmation messages or other
events occur.
--
Tim -
http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto