How do I do the code for an Option Group

DaniBoy

Registered User.
Local time
Today, 23:19
Joined
Nov 18, 2001
Messages
174
I am trying to make a code for an Option group so that when the option button is selected it makes certian comoboxes visible=false. I did this but it does not work. I cant remember how to do it. Please help
Daniel This is what i did

Private Sub frmSearch_BeforeUpdate(Cancel As Integer)
If optAddress.Value = 1 Then
cboAddress.Visible = False
ElseIf optWorkorder.Value = 2 Then
cboWorkorder.Visible = True
ElseIf optName.Value = 3 Then
cboName.Visible = True
End If
End Sub
 
Select Case optAddress
Case 1
cboAddress.Visible = False
Case 2
cboWorkorder.Visible = True
Case 3
cboName.Visible = True
End Select

Be sure and set the individual controls Visible property to start with and/or add code in each of the Case statements, if necessary, to set the Visible property correctly for the controls.

[This message has been edited by Jack Cowley (edited 12-10-2001).]
 
Thanks I cant believe it was that easy.. I guess sometimes we need to step back and take a break!!!! thanks a lot..
Dani
 

Users who are viewing this thread

Back
Top Bottom