>>>>>>Terry,
>>>>>>
>>>>>>Checkboxes can have 3 values
>>>>>>
>>>>>>if (vartype(m.this.Value) == T_LOGICAL )
>>>>>> TRUE, FALSE or NULL
>>>>>>
>>>>>>else >> Numeric
>>>>>> 0, 1, or 2= null
>>>>>>endif
>>>>>>
>>>>>>If, in your case it can only be true/false or 0/1, use empty(m.this.Value)
>>>>>>
>>>>>>You can force its type to be logical by
>>>>>> (1) binding it to a logical Field, or
>>>>>> (2) if it does not have a controlsource, setting its default value to .T./.F. in the class
>>>>>
>>>>>Hi Greg
>>>>>
>>>>>Yes I knew this (as I indicated in my spiel), and that one can set the default value (as I said I now have done), etc. My beef is that I put the checkbox on the form, wrote code to accommodate it, then it went and changed its data type from T/F to 1/0.
>>>>>
>>>>>Cheers
>>>>>
>>>>>Terry
>>>>
>>>>Terry,
>>>>
>>>>Change your test to if( !empty(...Value) ) instead of if( ...Value ).
>>>
>>>Thanks, Greg but what test are you talking about?
>>
>>
>>The operator/operand type error of your first message
>>
>>Testing Empty() works on both numeric and logical data types
>
>But I've still got to test for 1/0 or T/F, as below:
>
>
>With Thisform
> If this.Value <> .F.
> .txtOperator.enabled = .F.
> .cboOperators.enabled = .F.
> .lValidOp = .T.
> Else
> .txtOperator.enabled = .T.
> .cboOperators.enabled = .T.
> If not EMPTY( .nOpCode)
> .lValidOp = .T.
> Else
> .lValidOp = .F.
> EndIf
> EndIf
> .lmEnablePrint()
>EndWith
>
>
>
>???????????????????/
>
>With Thisform
> If !empty(this.Value)
> .txtOperator.enabled = .F.
> .cboOperators.enabled = .F.
> .lValidOp = .T.
> Else
> .txtOperator.enabled = .T.
> .cboOperators.enabled = .T.
> If not EMPTY( .nOpCode)
> .lValidOp = .T.
> Else
> .lValidOp = .F.
> EndIf
> EndIf
> .lmEnablePrint()
>EndWith
>
>
Gregory