Hello friends, still asking for your precious help.
I have a form with a record source based on a query. It has a textbox which can indicate two different values: A or B.
If it has A, I would like disable other textboxes. If B, then the textboxes should not be disabled.
I have tried several ways, with the If Then, ElseIf and Case but none work. Please see code below
Example 1
If me.textbox1 = "A" then
Me.textbox2.disabled = true
me.textbox3.disables = true
If me. textbox1 = "B" then
Me.textbox2.disabled = false
me.textbox3.disables = false
Example 2
Select Case Me.textbox1
Case "A"
Me.textbox2.disabled = True
Me.textbos3.disabled = True
Case "B"
Me.textbox2.disabled = False
Me.textbos3.disabled = False
End Select
Thank you
I have a form with a record source based on a query. It has a textbox which can indicate two different values: A or B.
If it has A, I would like disable other textboxes. If B, then the textboxes should not be disabled.
I have tried several ways, with the If Then, ElseIf and Case but none work. Please see code below
Example 1
If me.textbox1 = "A" then
Me.textbox2.disabled = true
me.textbox3.disables = true
If me. textbox1 = "B" then
Me.textbox2.disabled = false
me.textbox3.disables = false
Example 2
Select Case Me.textbox1
Case "A"
Me.textbox2.disabled = True
Me.textbos3.disabled = True
Case "B"
Me.textbox2.disabled = False
Me.textbos3.disabled = False
End Select
Thank you