Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / May 2007

Tip: Looking for answers? Try searching our database.

Update query warnings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
acores - 23 May 2007 09:15 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.