creating a yes or no or non applicable boxes

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.

 

 

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, 
Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Microsoft Access MVP since 2007

4 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

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.  

_____________________
Ken Sheridan,
Stafford, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

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

_____________________
Ken Sheridan,
Stafford, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

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. 
Hope this helps,
Scott<>
Blog: http://scottgem.wordpress.com
Microsoft Access MVP since 2007

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

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

I think you are confusing a Boolean column with a check box control.  Unless things have changed in Access 2010/2013 the former has no TripleState property, only the latter.  A check box bound to a Boolean column will, in the absence of the column's  DefaultValue having been set to True or False,  be Null when the form moves to an empty new record, but as soon as data begins to be entered into any control in the form its value will become False.  The control is initially Null, not the column.
_____________________
Ken Sheridan,
Stafford, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

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 reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

There's nothing wrong with the expression; I've used it many times as the ValidationRule property for an integer column.   Be sure you have it exactly as below:

Is Null Or (>=-1 And <=0)
_____________________
Ken Sheridan,
Stafford, England

"Don't write it down until you understand it!" - Richard Feynman

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated November 3, 2020 Views 5,470 Applies to: