I often have vba code that runs action queries and I want the warnings temporarily suppressed during their execution, so pretty much the standard usage for the SetWarnings method.
So at the beginning I put in:
DoCmd.SetWarnings (WarningsOff)
And at the end I put in
DoCmd.SetWarnings (WarningsOn)
Sometimes this seems to work, but most of the time the warnings stay off, which gives me problems. Does anyone know why this doesn't function? In fact, it might be that the only time it works right is if it's in a macro instead of code I find it suspicious that it doesn't automatically capitalize warningson and warningsoff, like the editor doesn't recognize them as special words.
So at the beginning I put in:
DoCmd.SetWarnings (WarningsOff)
And at the end I put in
DoCmd.SetWarnings (WarningsOn)
Sometimes this seems to work, but most of the time the warnings stay off, which gives me problems. Does anyone know why this doesn't function? In fact, it might be that the only time it works right is if it's in a macro instead of code I find it suspicious that it doesn't automatically capitalize warningson and warningsoff, like the editor doesn't recognize them as special words.