I have a checkbox that I set to "true" as
chkSuppressHeader = 1
But when I run the following debug statements....
Debug.Print "chkSuppressHeader " & Str(chkSuppressHeader)
Debug.Print "Not chkSuppressHeader " & Str(Not chkSuppressHeader)
,,,I get this...
chkSuppressHeader 1
Not chkSuppressHeader -2
Why is "Not chkSuppressHeader" = -2? I would think it would be 0 (False)
Tom Lake - 10 May 2005 15:10 GMT
>I have a checkbox that I set to "true" as
>
> chkSuppressHeader = 1
True is -1, not 1.
> ,,,I get this...
>
> chkSuppressHeader 1
> Not chkSuppressHeader -2
>
> Why is "Not chkSuppressHeader" = -2? I would think it would be 0 (False)
True is -1, NOT -1 gives 0 since NOT TRUE is FALSE.
NOT 0 gives -1 which is TRUE.
Tom Lake
Rick B - 10 May 2005 16:05 GMT
In Access true is -1, not 1.
Not sure why you are getting -2, but I assume it is because it does not know
how to handle "not" when you have not entered a valid true or false
statement.

Signature
Rick B
> I have a checkbox that I set to "true" as
>
[quoted text clipped - 11 lines]
>
> Why is "Not chkSuppressHeader" = -2? I would think it would be 0 (False)