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 Programming / July 2005

Tip: Looking for answers? Try searching our database.

Suppressing delete warning

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 29 Jul 2005 11:50 GMT
On my form I have a button, which runs code to delete records from a
temporary table:

DoCmd.RunSQL "DELETE myTMPtable.* FROM myTMPtable"

Is it possible to programmatically suppress the delete warning?

Thank you in advance for any tips!
Ofer - 29 Jul 2005 12:34 GMT
Use the setwarnings command to false

Docmd.SetWarnings False
DoCmd.RunSQL "DELETE myTMPtable.* FROM myTMPtable"
Docmd.SetWarnings True

Don't forget to set the warnings back to true

> On my form I have a button, which runs code to delete records from a
> temporary table:
[quoted text clipped - 4 lines]
>
> Thank you in advance for any tips!
Allen Browne - 29 Jul 2005 13:08 GMT
Best solution:
   dbEngine(0)(0).Execute "DELETE...", dbFailOnError

That generates no message, unless something goes wrong (e.g. a record could
not be deleted because someone is editing it.)

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> On my form I have a button, which runs code to delete records from a
> temporary table:
[quoted text clipped - 4 lines]
>
> Thank you in advance for any tips!
 
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.