Hello.
I wonder how can I avoid (with VB), the warning messages that appear when I
execute update query’s.
I know that I can go to Tools > Options > (Tab) Edit/Find in Access 2003 and
just uncheck the three boxes in the Confirm section (Records changes,
Documents elimination, Action query’s), but then I need to do it on every
machine that will run the database. And that's what I don’t want.
Is possible to integrate in a VB module those procedures in order that the
user doesn’t realize at all that those boxes are being unchecked when he
executes the update query, and checked again, when the query ends?
I just don’t know the exact commands in VB that control those three boxes in
order to turn them to False/True.
Thank you for the effort.
Regards
Andy Hull - 23 May 2007 09:31 GMT
Hi
Use...
DoCmd.SetWarnings False
(& turn them back on with True)
Regards
Andrew Hull
> Hello.
>
[quoted text clipped - 16 lines]
>
> Regards
acores - 24 May 2007 23:58 GMT
Thank you to both. That worked fine.
> Hi
>
[quoted text clipped - 28 lines]
> >
> > Regards
SteveS - 23 May 2007 10:52 GMT
For action queries (like Update, Delete or Insert), I prefer to use the
Application.Execute method.
Example 1:
strSQL = "UPDATE Contacts SET Contacts.SndX = soundex([LastName]) WHERE
((Not (Contacts.LastName) Is Null));"
Currentdb.Execute strSQL, dbFailOnError
Example 2:
Set db = CurrentDb
db.Execute "UPDATE Contacts SET Contacts.SndX = Null;", dbFailOnError
You don't get the warnings, but you will still get error messages.
HTH

Signature
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
> Hello.
>
[quoted text clipped - 16 lines]
>
> Regards