ACC: Toggle Button with BeforeUpdate Set to CancelEventID: Q90142
|
Moderate: Requires basic macro, coding, and interoperability skills.
On a form, a toggle button that has its BeforeUpdate property set to a
macro that carries out the CancelEvent action behaves differently than a
text box that has the same BeforeUpdate property setting.
Text boxes have a state in which they hold a Dirty value that cannot be
saved or validated. This is why you can click a text box and, without
making a change, move to another control.
Toggle buttons do not have a static state holding a Dirty value that
cannot be validated. When the CancelEvent occurs, the button is left in
its original, raised state. The button code does not consider the button
to be dirty after the save failed. It has the original clean value.
This behavior is by design.
Toggle Button:
ControlName: Discontinued
ControlSource: Discontinued
Before Update: CancelEvent Test
Text Box:
ControlName: ProductName
ControlSource: ProductName (or Product Name in versions 1.x and
2.0)
Before Update: CancelEvent Test
Macro Name Action
--------------------------------
CancelEvent Test CancelEvent
Keywords : kbusage FmsHowto
Version : 1.0 1.10 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: March 11, 1999