As Marshall says, Access doesn't provide the status of SetWarnings to you.
What are you doing that requires you to set/know this?
There may be a better way, e.g.:
Action queries: suppressing dialogs, while knowing result
at:
http://allenbrowne.com/ser-60.html
In the end, you could create a public variable in a standard module (not
that of a form or report), and set/read it as required. This kind of thing:
Public bWarningsOff As Boolean
Function SetTheWarnings(bWarning as Boolean) As Boolean
bWarningsOff = bWarning
DoCmd.SetWarnings bWarning
SetTheWarnings = bWarning
End Sub
Function GetTheWarnings() As Boolean
GetTheWarnings = bWarningsOff
End Function
Then you use SetTheWarnings instead of DoCmd.SetWarnings. In your app's
initializations, include:
Call SetThwWarnings(False)
so that the variable and actual state match when the database opens.
The main trouble with this is that the public variable is reset to False
when you reset your code, as you frequently do during development.