Base a value on a option group choice

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to set a value for and lock textboxes based on a option group choice.
The option group is functioning properly.
 
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.
 
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.
 
Back
Top