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.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"egerds" <(E-Mail Removed)> wrote in message
news:fce3ecf7-4ff0-452d-97d8-(E-Mail Removed)...
> How does on return what the true/false 0 or -1 of current status
> docmd.SetWarnings in access 97?
>
> like a
> dim byt_X as byte
> byt_X = SetWarnings(?).?
> without the docmd
>