Morning everyone, I hope your day is going better than mine. I have a
very frustrating problem that is driving me completely nuts!! I have
a macro that runs a few queries then emails a report - no problem.
Originally I set Echo and setwarning to "No" at the onset of the
macro the back to "Yes" upon completion. The user was still being
prompted for each query. I piddled with it some more checking to make
sure I didn't have some stray code that was forcing it all on. No
luck, the only bit of code was an on timer event that shuts the
database down when we update. Out of frustration I unchecked the
confirm document deletions, record changes and action queries boxes
(BIG CRINGE!!!!) The user is still being prompted!!! OK Now I'm about
to pull my hair out. So I thought "I'll fix you", I created 2
functions one to turn them off and one to turn them back on. Here's
the code:
Function ShutOff()'ran at the beginning of the macro
Dim App As Application
Set App = Application
App.SetOption "Confirm Action Queries", False
App.SetOption "Confirm Record Changes", False
App.SetOption "Confirm Document Deletions", False
End Function
Function TurnOn()'ran at the end of the macro
Dim App As Application
Set App = Application
App.SetOption "Confirm Action Queries", True
App.SetOption "Confirm Record Changes", True
App.SetOption "Confirm Document Deletions", True
End Function
When I run each function it "looks" like it is doing exactly what it
is supposed to - BUT I AM STLL BEING PROMPTED!!! Somebody PLEASE give
me a clue, anything ... What in the #$%& is going on? I have a
feeling that it's something simple - but WHAT?
BTW it Access97 - and is happening on a Win98 and a WinNt machine
I'm gonna smoke, get some coffee and cool off...
You guys are the best - I know someone out there can help!!!
Thanks everyone - Becki
very frustrating problem that is driving me completely nuts!! I have
a macro that runs a few queries then emails a report - no problem.
Originally I set Echo and setwarning to "No" at the onset of the
macro the back to "Yes" upon completion. The user was still being
prompted for each query. I piddled with it some more checking to make
sure I didn't have some stray code that was forcing it all on. No
luck, the only bit of code was an on timer event that shuts the
database down when we update. Out of frustration I unchecked the
confirm document deletions, record changes and action queries boxes
(BIG CRINGE!!!!) The user is still being prompted!!! OK Now I'm about
to pull my hair out. So I thought "I'll fix you", I created 2
functions one to turn them off and one to turn them back on. Here's
the code:
Function ShutOff()'ran at the beginning of the macro
Dim App As Application
Set App = Application
App.SetOption "Confirm Action Queries", False
App.SetOption "Confirm Record Changes", False
App.SetOption "Confirm Document Deletions", False
End Function
Function TurnOn()'ran at the end of the macro
Dim App As Application
Set App = Application
App.SetOption "Confirm Action Queries", True
App.SetOption "Confirm Record Changes", True
App.SetOption "Confirm Document Deletions", True
End Function
When I run each function it "looks" like it is doing exactly what it
is supposed to - BUT I AM STLL BEING PROMPTED!!! Somebody PLEASE give
me a clue, anything ... What in the #$%& is going on? I have a
feeling that it's something simple - but WHAT?
BTW it Access97 - and is happening on a Win98 and a WinNt machine
I'm gonna smoke, get some coffee and cool off...
You guys are the best - I know someone out there can help!!!
Thanks everyone - Becki