Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / May 2005

Tip: Looking for answers? Try searching our database.

Using NOT for boolean value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 10 May 2005 14:50 GMT
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)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.