Used to negate a numeric expression.
result = Not expr
The following table illustrates how result is determined.
The Not operator performs a bit-wise comparison of identically positioned bits in two
numeric expressions and sets the corresponding bit in result according to the
following truth table.
|If expr is
||Then result is
The Not operator inverts the bit values of any variable. If an integer variable has
the value 0 (False), the variable becomes -1 (True); if it has the value -1, it
becomes 0. However, a bit-wise Not comparison can be performed only in Access Basic.
|Bit in expr
||Bit in result
This example prints a message that depends on the value of variables A and B,
assuming neither variable is a Null. If A = 10 and B = 8, the Not expression evaluates True because A is not equal to B.
If Not A = B Then
Debug.Print "A and B aren't equal."
Debug.Print "A and B are equal."