>Hi, is there is such a code to verify is an option button is
>selected??
>& what is the option group?
> & if there is such a code where i wriet it? I mean in which event
>
>thanks for any help
An "Option Box" or "Option Group" control is a box containing several
other controls (which might be checkboxes, option buttons, or toggle
switches). Each such control has an associated number - it might be
three checkboxes numbered 1, 2 and 3 for example.
The Value property of the Option Group control is whichever value the
user selected - if they check the checkbox numbered 3, the value of
the Option Group control will then be 3.
You can put code in the Option Group's AfterUpdate event to detect
that the user has made a selection.
John W. Vinson[MVP]
HANA - 25 Jul 2006 01:47 GMT
hi John
thank you for reply I did understand you verey well, but now my qustion to
you is
when i selecet an Option Button it's number was 16 and the othere was 19
..... be with me in that!!!! ok frist! Is there is worng in that?
2- Do i wriet this code?
Private Sub Option16_AfterUpdate()
If Me.ogrMyOptionGroup = 1 Then
<OPtion Button Is Selected>
& if itis not What is the right code?
John Vinson - 25 Jul 2006 02:30 GMT
>hi John
>
[quoted text clipped - 3 lines]
>when i selecet an Option Button it's number was 16 and the othere was 19
>..... be with me in that!!!! ok frist! Is there is worng in that?
You should use the AfterUpdate event *OF THE OPTION GROUP CONTROL* -
not the afterupdate event of each button in that control.
Private Sub ogrMyOptionGroup_AfterUpdate()
If Me!obrMyOptionGroup = 16 Then
<do something appropriate if button 16 was clicked>
End If
or, more commonly,
Select Case Me!obrMyOptiongroup
Case 1
<do something appropriate for option 1>
Case 2
<and so on and so on...
...
End Select
John W. Vinson[MVP]
HANA - 25 Jul 2006 08:26 GMT
OK THANK YOU VEREY MUCH I WILL TRY THIS
> >hi John
> >
[quoted text clipped - 23 lines]
>
> John W. Vinson[MVP]