Logic Operations require Boolean Values

From Xojo Documentation

Error message

You used a variable that was not of type Boolean or an expression that did not evaluate to a Boolean where a Boolean was expected.

See Also

Boolean data type.