I want tosetup a form, that when a certain field is changed to yes, a hidden control is shown. But there there are multiple records and not all will be made "yes" at the same time.
I want tosetup a form, that when a certain field is changed to yes, a hidden control is shown. But there there are multiple records and not all will be made "yes" at the same time.
one solution is to do what you just said, and then use a form event to hide the control again when you move from record to record.
As an example, here's what I did.
I created 2 combo boxes named combo0 and combo2. Combo2 is the YES/NO control. You then put in an IF/Then statement in the ON CHANGE property of combo2. You need to identifiy each and every control that needs to be made visible. If they do not need to be make visible then do not code them and they will stay invisible. So make sure to have them be invisible to begin with. Controls have a Visible field in the Format tab near the top of the list.
Here's the code for the On Change property of Combo 2
Private Sub Combo2_Change()
If Combo2 = "Yes" Then Combo0.Visible = True
End Sub
You would add in the same private sub any other controls that need to be toggled on.