|
 |
access thread: Access 2000 Form_AfterDelConfirm Event procedure might not execute
Message #1 by "Howard Ronald Brown Jr." <rbrown@n...> on Wed, 26 Sep 2001 01:49:44
|
|
Microsoft suggests that code that needs to be run after a record deletion
using a form be placed in the Form_AfterDelConfirm event procedure.
However, if a user tired of having to confirm deletions unchecks the
Tools/Options/"Edit/Find"/Confrim: Record changes checkbox then this code
will not be run. Most of the MS Documentation dealing with this event
says so, but none that I've seen tells you how to programmically check the
status of this option, nor how to turn it back on. Would someone please
tell me how to do this?
Message #2 by "Pardee, Roy E" <roy.e.pardee@l...> on Wed, 26 Sep 2001 06:23:24 -0700
|
|
The Application object has a GetOption method you use to find out the
present state of the setting, and the SetOption method you use to change
that setting. It's probably a good practice to restore the value to the
prior setting, just so your users don't have to go back in and change their
settings for other mdbs. Here's some sample code I'm using to turn off name
autocorrect. I put this in my startup switchboard form.
' General Declarations Section:
Private Const m_strcAutoCorr As String = "Track Name AutoCorrect
Info"
Dim m_booTrackAutoCorr As Boolean
' ---------------------------------------------------
' Form_Load()
' Turn off the TrackNameAutoCorrect feature--it's a hog!
' Store off previous value
m_booTrackAutoCorr = Application.GetOption(m_strcAutoCorr)
Call Application.SetOption(m_strcAutoCorr, False)
' ---------------------------------------------------
' Form_Unload()
' Restore previous value of AutoCorrect setting
Call Application.SetOption(m_strcAutoCorr, m_booTrackAutoCorr)
' ----------------------------------------------------
I believe the string to pass SetOption for the confirm deletes setting is
"Confirm Record Changes" (and if that doesn't work, try "Confirm Action
Queries").
HTH,
-Roy
Roy Pardee
Programmer/Analyst
SWFPAC Lockheed Martin IT
(xxx) xxx-xxxx
-----Original Message-----
From: Howard Ronald Brown Jr. [mailto:rbrown@n...]
Sent: Tuesday, September 25, 2001 6:50 PM
To: Access
Subject: [access] Access 2000 Form_AfterDelConfirm Event procedure might
not execute
Microsoft suggests that code that needs to be run after a record deletion
using a form be placed in the Form_AfterDelConfirm event procedure.
However, if a user tired of having to confirm deletions unchecks the
Tools/Options/"Edit/Find"/Confrim: Record changes checkbox then this code
will not be run. Most of the MS Documentation dealing with this event
says so, but none that I've seen tells you how to programmically check the
status of this option, nor how to turn it back on. Would someone please
tell me how to do this?
Message #3 by "Howard Ronald Brown Jr." <rbrown@n...> on Thu, 27 Sep 2001 01:13:14
|
|
Thanks. I'll give it a try.
Ron Brown
|
|
 |