Hello all I have the following question using Ms access 2010
I have two text boxes where depending on what is entered on the first the 2nd disabled.
that works fine
but if I make a mistake and enters a value on the 2nd while it is was enabled and return back to the first and enters a value which disable the 2nd, it disable it ok but keeps the value and even save it to the table. any idea why this is happening. thanks in advance.
Private Sub q300_AfterUpdate()
If Me.q300 = "1" Then
Me.q300_1 = ""
Me.q300_1.Enabled = False
Me.q301.SetFocus
Else
Me.q300_1.Enabled = True
End If
End Sub
I have two text boxes where depending on what is entered on the first the 2nd disabled.
that works fine
but if I make a mistake and enters a value on the 2nd while it is was enabled and return back to the first and enters a value which disable the 2nd, it disable it ok but keeps the value and even save it to the table. any idea why this is happening. thanks in advance.
Private Sub q300_AfterUpdate()
If Me.q300 = "1" Then
Me.q300_1 = ""
Me.q300_1.Enabled = False
Me.q301.SetFocus
Else
Me.q300_1.Enabled = True
End If
End Sub