SetWarnings


Turns warning messages on or off.

Syntax

DoCmd.SetWarnings WarningsOn 

where WarningsOn is a Boolean that indicates whether warning messages are on (True) or off (False).

Example

See the example for the Rename method.

Comments

  • Once you turn warning messages off, they remain off until you turn them back on. Since these messages are often warnings about potentially overwritten and deleted files, and since suppressing warnings amounts to automatically confirming all operations, it is extremely important that you enable warning messages again before your routine terminates.

  • The SetWarnings method has no effect on error messages.

  • The SetWarnings method suppresses only modal dialog boxes that allow the user to select command button options (Yes and No, or Yes, No, and Cancel). It does not suppress dialog boxes that expect other forms of user input.




Access VBA Programming
Microsoft Access VBA Programming for the Absolute Beginner
ISBN: 1598633937
EAN: 2147483647
Year: 2006
Pages: 214
Authors: Michael Vine

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net