Three State Check Box - Field Values (1 Viewer)

Rx_

Nothing In Moderation
Local time
Today, 03:50
Joined
Oct 22, 2009
Messages
2,803
A Checkbox control on a form can have three states when it
is bound to an Integer type number field.
Code:
The three visual states are :
checked               Non Zero
not checked          Zero
not checked gray       Null
While searching for the values, happened to notice that for Access 2008 the term threestate was easier to find than tristate

Any discussions for when to use a boolean field type (check box is yes or no) Vs a Threestate (Integer) can feel free to add here.
 

Banana

split with a cherry atop.
Local time
Today, 02:50
Joined
Sep 1, 2005
Messages
6,318
I wonder if it's really the integer that causes the Three State to be activated. Three State is actually a property of the checkbox object, and can be activated even for a boolean (mind, that is disconnected from the fact that VBA boolean and Jet's Yes/No data types cannot accept a null so such construct really make no sense.)

I'm of mind that three-state is mostly useless and more confusing -- it's easy for some user to miss the distinction and would sooner use a combobox or listbox with the list:

(Unknown)
Yes
No

which at least makes it more explicit to the users what it really means when they select so and so.
 

SOS

Registered Lunatic
Local time
Today, 02:50
Joined
Aug 27, 2008
Messages
3,517
Personally I have never had a situation where I've needed the third state. I guess you could use it in a survey type setting where Null represents that they have not answered the question and false is no and true is yes.
 

Banana

split with a cherry atop.
Local time
Today, 02:50
Joined
Sep 1, 2005
Messages
6,318
Oh, one more reason for not using three-state... I didn't test and may not be remembering it right but I believe once you click on it, there's no way to get back to a null state. While that might be desirable in some case, it's not always appropriate.
 

Rx_

Nothing In Moderation
Local time
Today, 03:50
Joined
Oct 22, 2009
Messages
2,803
I agree and made a case to the client to no avail. It is a legal survey as you say, new record starts as null, then a choice is made, record locked at end of editing, completion (except for supervisor over-ride).
It has been a long time since using it, had to go look up the states.

My suggestion to new users is to read the valued comments above and try not to use a three state. And consider that the customer is always right. Thus the paradox of a threestate. (that represents the gray area)
 
Last edited:

Users who are viewing this thread

Top Bottom