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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetWarnings off

Status
Not open for further replies.

phpatrick

Programmer
Jul 9, 2006
72
BE
I have an insert into Statement behind my form, after running access show the dialog box "do you want to add ?"
How can I set the warnings off ?
This won't work DoCmd.SetWarnings -1

tkxs in advance, bye
 
DoCmd.SetWarnings False,

don't know why, but now it works
 
don't know why
Because -1 = True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I suggest using CurrentDB.Execute to run action queries, rather than DoCmd.RunSQL or DoCmd.OpenQuery. It requires fewer lines of code (as you don't have to turn warning messages off first) and also provides for greater flexibility for transaction processing and displaying of error messages.

Ed Metcalfe.

Please do not feed the trolls.....
 
Code:
DoCmd.SetWarnings [COLOR=red]0[/color]

~Melagan
______
"It's never too late to become what you might have been.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top