Share via

creating a yes or no or non applicable boxes

Anonymous
2013-01-21T17:31:49+00:00

I would like to find out how I could create a triple option check box, for yes or no or NA (not applicable) in a form?  Would there have to be field for each in a table? I am creating a database for inspections.  There are some things that may be not be applicable for each item.

For example: 

Fire Department access aquedate   NA  yes  no

Pumper connections adequate       NA  yes  no  

Please advise.  Thank you very much for your assistance.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

7 answers

Sort by: Most helpful
  1. ScottGem 68,810 Reputation points Volunteer Moderator
    2013-01-21T17:41:13+00:00

    If you want to store either Yes, No or NA, then you need to use a text datatype. You can then use an option group or combobox to select the options. 

    If you use a Boolean field, you can have it accept a Null which will show a greyed checkbox,

    Was this answer helpful?

    4 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2014-07-18T13:04:57+00:00

    When I put in Is Null Or (>=-1 And <=0) in the Table Validation Rule property, I get error: The expression you entered contains invalid syntax: You may have entered a comma without a preceding value or identifier

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2013-01-21T18:12:56+00:00

    A Boolean (yes/no) column can only be TRUE or FALSE and cannot be NULL.  One way is to use a column of integer number data type with a ValidationRule property of:

    Is Null Or (>=-1 And <=0)

    A check box bound to this column in a form should have its TripleState property set to True (Yes).  This allows it to be Null.  This tallies with Codd's 3-way logic, TRUE, FALSE or MAYBE.  While Codd does not explicitly express support of Nulls, as Date has pointed out, his support for a 3-way logic does imply support of Null.  Date does not.

    However, what you are proposing is not really a 3-way logic in the sense that Codd meant.  Your  third option is N/A, which is a value.  Null is not a value of course, but the absence of a value.  So the use of an integer column in which Null is allowed to represent N/A is something you will need to consider carefully.  Many people would be happy with interpreting Null in this way, but I'd be cautious about it.  Null is semantically ambiguous, so could be interpreted as ' don't know'  rather than 'not applicable'.  It's your call, but I'd be happier with text values as Scott suggests.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. ScottGem 68,810 Reputation points Volunteer Moderator
    2013-01-21T19:42:33+00:00

    A Boolean (yes/no) column can only be TRUE or FALSE and cannot be NULL.  

    I believe an Access Yes/No field can be set to Triple State so it can have, at least, an initial value of Null.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-01-21T18:21:23+00:00

    PS:  Have you considered using an option group in a form?  This could have three option buttons with values of 1, 2 and 3 bound to a numeric foreign key column in the table which references the primary key of another two-column table with rows:

    1    Yes

    2    No

    3    N/A

    Was this answer helpful?

    0 comments No comments