Option buttons can appear clear from the start?

R

Robert

I have an an option group with 2 option buttons. When the form, which is
unbound, first displays there are grey dots inside these buttons (not good).
When you click on one of the buttons that button turns black and the other
one whites out (good). Not sure if I'm doing something wrong or not but I'd
like the 2 buttons to appear white when the form is opened instead of having
those grey dots inside. (I'm using Access 2002).

Robert
 
A

Arvin Meyer [MVP]

Ordinarily, an Option Group shows as Null (grey) if it is unbound, you could
add some code like:

Private Sub Form_Current()
If Me.NewRecord = True Then
Me.MyOptionGrp = 1
End If
End Sub

Which will give the first option a value that can be changed.
 
R

Robert

The entire form is unbound. There are no new records. I would like to have
both buttons whited out and no default value.
 
R

Rick Brandt

Robert said:
The entire form is unbound. There are no new records. I would like
to have both buttons whited out and no default value.

You refer to "Option Buttons" but then you talk about them being white versus
gray. Do you really mean "Radio Buttons"? If so, then your two goals are
mutually exclusive. A Radio Button is white only when the option group in which
it resides has a non-null value that does not correspond to the index value of
the Radio Button.

You can set the default value of the option group to a value that corresponds to
NONE of the RadioButtons and then they will all be white.
 
R

Robert

That's the answer I was looking for. Thank you.
Rick Brandt said:
You refer to "Option Buttons" but then you talk about them being white
versus gray. Do you really mean "Radio Buttons"? If so, then your two
goals are mutually exclusive. A Radio Button is white only when the
option group in which it resides has a non-null value that does not
correspond to the index value of the Radio Button.

You can set the default value of the option group to a value that
corresponds to NONE of the RadioButtons and then they will all be white.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top