I have a combo box that is bound to column 1 an ID# in a table. Based on the values in the combo box I would like to enable or disable other fields. The problem is, I have many values that are similar such as Multi-Family / Walkup, Multi-Family / Fourplex, Multi-Family /Duplex, etc. Currently, I have code that does this for two values but I don't want a big long if statement and if more types of Multi-Family / are added I don't want to hard code the id #'s. Here is my current code in the afterupdate event.
Code:
Private Sub cboType_AfterUpdate()
If Me.cboType = 3 Or Me.cboType = 34 Then
txtUnits.Enabled = True
txtPrice_Unit.Enabled = True
Else: txtUnits.Enabled = False
txtPrice_Unit.Enabled = False
End If
End Sub
Comment