Set combo 28 to run an event procedure on the Upon Change field and use the following code
Private Sub Combo28_Change()
Select Case Me.Combo28
Case "MALE"
Me![Text40].Visible = False
Case "Female"
Me![Text40].Visible = True
End Select
End Sub
(I added the Female option incase someone picks male by accident)
Is this OK?
David Lerwill
"If at first you don't succeed go to the pub"
A couple of minor but important corrections to the above post:
(a) Quotes around MALE
(b) Add an Else part, to ensure the control becomes visible again if "FEMALE" is selected;
The AfterUpdate event then becomes:
If Me!combo28 = "MALE" Then
Me![txt40].Visible = False
Else
Me![txt40].Visible = True
End IF
You will probably also need to consider using this code in the OnCurrent event, to ensure that the behaviour is consistent when you change from one record to the next.
Cheers,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
David,
Suggest that the OnChange event is not appropriate here. It gets triggered for each keystroke! Rather, use the AfterUpdate event, which only gets triggered once after the user has made his/her selection. Cheers,
Steve Lewy
Solutions Developer
steve@lewycomputing.com.au
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.