Hi, I have two combo box (cb1, and cb2) I would like to enable and disable cb2 when certain values in cb1 is selected. cb1 I have two fields ( ID ,Reason). I used the following code, which works great when I use one value after the like statement. ( when I select ID 1 on cb1 it disables cb2). But what if I want to select a different value , for example 2, it will not work. I tried writing the statement again and insert a 2, but it just ignores it .
Me.cb2.Enabled = Nz(Me.cb1.Value, vbNullString) Like "1"
Me.cb2.Enabled = Nz(Me.cb1.Value, vbNullString) Like "1"