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

Set Warnings

Status
Not open for further replies.

Eradic8or

Programmer
Oct 29, 2000
159
GB
Can someone tell why I have quite a large chunk of code which does mostly what I want except that I want to set the warnings (DoCmd.SetWarnings=False) to false before a line of code runs and I get the error "Argument not optional". If however, I create a macro that says Setwarning=false and then run that macro from my code, it all works okay.
Can someone tell me why as I hate using macros in Access as I find coding it much more acceptible for debugging.

Eradic8or.
 
remove the Equal sign

DoCmd.SetWarnings False
DoCmd.SetWarnings True

PaulF
 
Thank you, that works. I've been a VB programmer too long.

Eradic8or.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top