Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Client Settings.

Status
Not open for further replies.

serino

Programmer
Feb 13, 2003
107
US
Is there a way to disable the Client Settings "Confirm" for the queries? I have multiple users and I have to do this manually for each time a new user logs into a windows machine. It would be nice I I could do this once per machine and all three check boxes are disabled for all users.

Thanks for your assistance!

 
You may do it in your code:

Code:
[blue]DoCmd.SetWarnings False[/blue]
[green]
' Do something here[/green]
strSQL = "DELETE * FROM customers"
DoCmd.RunSQL strSQL
[blue]
DoCmd.SetWarnings True[/blue]

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
I prefer this methodology in general to Andy's...

Turning 'SetWarnings' on and off will suppress all errors from being seen. Which is ok for static queries and you could use docmd.openquery to open a saved query too.

But if you were building your SQL statement programmatically... Then the execute method will throw an error if your query doesn't run or even if the backend is corrupt...

Code:
DIM db as DAO.Database 'requires a reference to  DAO/ Data Access Objects

set db = currentdb()

strSQL = "DELETE * FROM customers"
db.execute strSQL, dbFailOnError
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top