How to 'remember' Option Group value prior to clicking another opt

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Say there are 3 buttons in an option group whose values are 1,2,3.

Say option 2 is currently checked. When option 1 is clicked I do a validity
check (in the option group OnClick event) and it fails. How do I know what
the previous value was so that I can set it back.
 
You could possibly store the value temporarily in the tag property of the
option group.
 
ThomasAJ said:
Say there are 3 buttons in an option group whose values are 1,2,3.

Say option 2 is currently checked. When option 1 is clicked I do a validity
check (in the option group OnClick event) and it fails. How do I know what
the previous value was so that I can set it back.


You can the option box's BeforeUpdate event to do the
validity check. If it fails, use the box's Undo method and
set Cancel = True.

If it's a bound option box, you can get the previous value
from the control's OldValue property at any time.
 
Back
Top