ACC: Using a Conditional Macro to Confirm Changes to a FieldID: Q99400
|
Moderate: Requires basic macro, coding, and interoperability skills.
This article shows you how to use a conditional macro to prompt
the user to confirm changes to a field.
The following procedure uses the Employees form in the sample
database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0):
Macro Name Condition Action
---------------------------------------------------------
AreYouSure MsgBox("Commit changes?",1)=2 CancelEvent
... SendKeys
AreYouSure Actions
----------------------
CancelEvent
SendKeys
Keystrokes: {ESC}
Wait: NO
Text box: Title
---------------
Name (or ControlName in version 1.x): Title
ControlSource: Title
BeforeUpdate: AreYouSure
For more information about the Message box function, search the Help Index for "MsgBox Function."
Additional query words: forms macros data validation
Keywords : McrCond
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Issue type : kbinfo
Last Reviewed: March 23, 1999