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 / Queries / November 2007

Tip: Looking for answers? Try searching our database.

run a quety without a warning

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jone - 12 Nov 2007 00:13 GMT
what code do I write to run a query without getting a warning ?
and I dont want to set it by the access options because then it dose not
warn me by running any  query.
Douglas J. Steele - 12 Nov 2007 00:18 GMT
You can either issue a DoCmd.SetWarnings False before running the query, and
DoCmd.SetWarnings True afterwards, or you can use the Execute method of the
QueryDef object. I prefer the latter, because it also allows you to specify
dbFailOnError as an option, meaning that a trappable error will be raised if
something goes wrong running the query.

CurrentDb.QueryDefs("MyActionQuery").Execute dbFailOnError

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> what code do I write to run a query without getting a warning ?
> and I dont want to set it by the access options because then it dose not
> warn me by running any  query.
 
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



©2008 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.