Hey,
I would like to disable a bound textbox in a multiple item form, based on another textbox/field value from the same record.
I want to prevent users from entering data in a field/textbox if another field/textbox contains a specific string.
The multiple item form is created from a SELECT view.
So if fieldA/textboxA contains "AAA", textboxB should be disabled (not editable).
If fieldA/textboxA contains anything else, textboxB should be enabled (editable).
I tried this but nothing happens:
I would like to disable a bound textbox in a multiple item form, based on another textbox/field value from the same record.
I want to prevent users from entering data in a field/textbox if another field/textbox contains a specific string.
The multiple item form is created from a SELECT view.
So if fieldA/textboxA contains "AAA", textboxB should be disabled (not editable).
If fieldA/textboxA contains anything else, textboxB should be enabled (editable).
I tried this but nothing happens:
Code:
Private Sub Form_Activate()
If [fieldA] = "AAA" Then
[fieldB].Locked = True
[fieldB].Enabled = False
End If
End Sub
Private Sub Form_Load()
If [fieldA] = "AAA" Then
[fieldB].Locked = True
[fieldB].Enabled = False
End If
End Sub