Base a value on a option group choice

K

Kim

I want to set a value for and lock textboxes based on a option group choice.
The option group is functioning properly.
 
M

Marshall Barton

Kim said:
I want to set a value for and lock textboxes based on a option group choice.
The option group is functioning properly.


Use the option group's AfterUpdate event:

Select Case Me.optiongroup
Case 1,2,5 'options that hide other controls
Me.textbox1.Visible = False
. . .
Case Else 'otherwise, show other controls
Me.textbox1.Visible = True
. . .
End Select

If your form can navigate to other records, then you will
probably want the same code in the form's Current event.
 
K

Kim

Thanks so much Marsh - easy fix!
--
Kim


Marshall Barton said:
Use the option group's AfterUpdate event:

Select Case Me.optiongroup
Case 1,2,5 'options that hide other controls
Me.textbox1.Visible = False
. . .
Case Else 'otherwise, show other controls
Me.textbox1.Visible = True
. . .
End Select

If your form can navigate to other records, then you will
probably want the same code in the form's Current event.
 
Top