I stumbled across a way to disable / enable controls based on two text strings being the equal. In the sample below, Command1’s click enable the label. Cammand2 disabled the label. Does anyone see anything wrong with this approach? Some of the other programmers I work with don’t trust it. Was wanting some other opinions or if anyone could tell me why this is a bad approach.
Private Sub Command1_Click()
Me.Label1.Enabled = "Blah" = "Blah"
End Sub
Private Sub Command2_Click()
Me.Label1.Enabled = "Blah" = "halB"
End Sub
Private Sub Command1_Click()
Me.Label1.Enabled = "Blah" = "Blah"
End Sub
Private Sub Command2_Click()
Me.Label1.Enabled = "Blah" = "halB"
End Sub