option groups

  • Thread starter Thread starter Marc B
  • Start date Start date
M

Marc B

Hello All,

How can I reset a button in an option group so that once clicked, it pops
back up again?
 
Marc B said:
Hello All,

How can I reset a button in an option group so that once clicked, it pops
back up again?

You need to add a button (or similar) to the form that will set the OptionGroup value
to Null. The normal behavior is that once you make a selection you are stuck with at
least one option always being selected. I usually add a button or label that says
"Clear" and set the group to Null with that.
 
when i'm running code from the option group's OnClick or
AfterUpdate event, i usually capture the value in a
variable and then reset the value to null, as:

Private Sub OptionGroup_OnClick()

Dim intSelection As Integer
intSelection = Me!OptionGroup

Me!OptionGroup = Null
'whatever actions you want performed when
'the option group is clicked.

End Sub

end result: your code is carried out, AND the option
group's buttons are all "up" and ready to be selected
again.

hth

-----Original Message-----


You need to add a button (or similar) to the form that will set the OptionGroup value
to Null. The normal behavior is that once you make a
selection you are stuck with at
 
Back
Top