I have a form that contains 6 textboxes, a combo box and 3 checkboxes. The first textbox is used for a unique id; if the user starts to enter this ID, I need to disable the other 5 texboxes, combo box and 3 checkboxes or enable them if the user removes entered numerics. I have attempted to this under every option under the textbox control that pertains to keypress, keyup, keydown, etc... I have also attempted this under the form options as well. It is probably something very simple and I am simply not in my focused mode. Here is the code for my fired functions
The function correctly functions when I call the primary sub by other means
Code:
Private Sub CheckEntry()
If IsNull(txtParcelID.Value) Then
EnableForm
Else
DisableForm
End If
End Sub
Private Sub DisableForm()
txtOwnerName.Enabled = False
txtOwnerName.Value = Nothing
txtPropertyStreetNumber.Enabled = False
txtPropertyStreetNumber.Value = Nothing
txtPropertyStreetName.Enabled = False
txtPropertyStreetName.Value = Nothing
txtOwnerStreetAddress.Enabled = False
txtOwnerStreetAddress.Value = Nothing
txtOwnerCity.Enabled = False
txtOwnerCity.Value = Nothing
cboOwnerState.Enabled = False
cboOwnerState.Value = ""
txtOwnerZipcode.Enabled = False
txtOwnerZipcode.Value = Nothing
chkExempt.Enabled = False
chkExempt.Value = 0
chkPaid.Enabled = False
chkPaid.Value = 0
chkUnpaid.Enabled = False
chkUnpaid.Value = 0
End Sub
Private Sub EnableForm()
txtOwnerName.Enabled = True
txtOwnerName.Value = Nothing
txtPropertyStreetNumber.Enabled = True
txtPropertyStreetNumber.Value = Nothing
txtPropertyStreetName.Enabled = True
txtPropertyStreetName.Value = Nothing
txtOwnerStreetAddress.Enabled = True
txtOwnerStreetAddress.Value = Nothing
txtOwnerCity.Enabled = True
txtOwnerCity.Value = Nothing
cboOwnerState.Enabled = True
cboOwnerState.Value = ""
txtOwnerZipcode.Enabled = True
txtOwnerZipcode.Value = Nothing
chkExempt.Enabled = True
chkExempt.Value = 0
chkPaid.Enabled = True
chkPaid.Value = 0
chkUnpaid.Enabled = True
chkUnpaid.Value = 0
End Sub


Comment