Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

value of option button

Status
Not open for further replies.

jebushatescats

IS-IT--Management
Jun 6, 2006
37
CA
Hello all

I have 2 option buttons grouped together on a frame. I need to be able to determine if one or the other is checked to allow a textbox to be either visable or not visable. I am having a heck of a time trying to determine wqhich property changes when an option button is either selected or not selected.


thanks
 
jebushatescats
By frame I assume you mean an Option Group.

Each of the option buttons in the group will have a value. I assume they will be 1 and 2.

On the AfterUpdate event for the Frame, put the following code...
Code:
If Me.YourFrameName = 1 then
Me.YourTextBoxName.Visible = True
Else
Me.YourTextBoxName.Visible = False
End If

Tom
 
Or if you get to the point where you have more than two you can use
select case me.yourframename
case = 1
me.yourtextboxname.visible = true
me.othertextboxes.visible = false
case = 2
me.yourtextboxname.visible = true
me.othertextboxes.visible = true
case = 3
etc et etc
end select

Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top