tags:

views:

1111

answers:

2

This should be easy but for some reason it will not work. I have a form named MainForm and the selection in the Option Group I want to select is called PickMe.

I have a text box called TxtHere that I set to not be visible.

I wrote this:

Private Sub PickMe_Click()  
Me!TxtHere.Visible = True 
End Sub

So it should set the text box to visible when I select PickMe but this does not work. Any ideas? I feel stupid for asking something so simple.

+1  A: 

I figured it out.

With a Option Group use:

_MouseDown and Me.xxx.Visible = True
Nick S.
+1  A: 

Er, with an option group, you should use the AfterUpdate() event of the option group, and then use a SELECT CASE to test the value returned by the option group.

David-W-Fenton
Does this have any advantage over what I'm doing now?
Nick S.
Yes. Because it's the way option groups are supposed to be used. The events of the subcontrols are irrelevant. You want to do something when the value of the option group changes, not just when someone clicks on it.
David-W-Fenton
Ok thanks I'll use this instead.
Nick S.