A family of Microsoft relational database management systems designed for ease of use.
A few things wrong here:
1. You cannot compare something to Null. Nothing equals Null, not even Null. The IsNull function is used to determine if something is Null.
2. In any case the Enabled property is either True or False, not Null.
So:
Private Sub Text_box_AfterUpdate()
If IsNull(Me.text_box) Then
Me.Text_box_2.Enabled = False
Else
Me.Text.box_2.Enabled = True
End If
End Sub
or more succinctly:
Private Sub Text_box_AfterUpdate()
Me.Text.box_2.Enabled = Not IsNull(Me.text_box)
End Sub
If this is in a bound form and you want the Text.box_2 to be disabled when you move to an existing record where Text_box is Null, then also put the code in the form's Current event procedure.
Ken Sheridan, Stafford, England