Hello,
Having trouble with a type mismatch error.
I have form with 2 unbound combo boxes and 1 check box. The combo boxes are text boxes, the check box is a yes/no in table. Default Value of check box is 0. Lets call the combo boxes CMB1 and CMB2. and the Check box CK1
My code is breaking on the IF statement. (Not sure what the check box should be DIM as. Right now I have it
Dim CK1 as String
I know its something stupid, like I need to DIM CK1 as something else, or change the value in the if statement from CK1 = "" to CK1= 0, CK1= False, or CK1= No.... but I've been playing with it and I can't figure it out.
Having trouble with a type mismatch error.
I have form with 2 unbound combo boxes and 1 check box. The combo boxes are text boxes, the check box is a yes/no in table. Default Value of check box is 0. Lets call the combo boxes CMB1 and CMB2. and the Check box CK1
My code is breaking on the IF statement. (Not sure what the check box should be DIM as. Right now I have it
Dim CK1 as String
Code:
IF Me!CMB1 = "Choice1" or Me!CMB1 = "Choice2" and CK1="" and CMB2="" Then
Msgbox "You must make a selection", , "Invalid Selection"
I know its something stupid, like I need to DIM CK1 as something else, or change the value in the if statement from CK1 = "" to CK1= 0, CK1= False, or CK1= No.... but I've been playing with it and I can't figure it out.