Hi. I hope this is an easy one, I just can't figure out how to do it.
I have four controls that are used for entering text. TWO of the controls [controlA and controlB] are kept visible and TWO of the others are not. What I want to happen is when I type in data for EITHER controlA OR controlB, the other two controls [controlC and controlD] would then appear. I understand that if I only had one control visible (let's say I didn't have controlB) the code would be like this
in my case.. I need it to work if either controlA OR controlB has data in it. It's not going to ALWAYS be JUST controlA or JUST controlB.. it's either one, or the other, or both.
Thanks in advance.
I have four controls that are used for entering text. TWO of the controls [controlA and controlB] are kept visible and TWO of the others are not. What I want to happen is when I type in data for EITHER controlA OR controlB, the other two controls [controlC and controlD] would then appear. I understand that if I only had one control visible (let's say I didn't have controlB) the code would be like this
Code:
Private Sub controlA_Change()
If Me.controlA.Value = "" Then
Me.controlC.Enabled = False
Me.controlD.Enabled = False
Else
Me.controlC.Enabled = True
Me.controlD.Enabled = True
End If
End Sub
in my case.. I need it to work if either controlA OR controlB has data in it. It's not going to ALWAYS be JUST controlA or JUST controlB.. it's either one, or the other, or both.
Thanks in advance.