Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can you add NA to a Yes/No data type

Status
Not open for further replies.

TammyT

Programmer
Sep 17, 2003
183
0
0
US
I am creating a Db to store the data on reviews completed on case files for an agency. There are about 174 questions, each of which can be answered Yes, No or NA.

I know how to make a data type be Yes/No, but how do I add in NA? I'm thinking that on the input form I'll want to use an option group, with a button for each answer; however, I'm not sure how to store the NA. Or should I not be using a data type of Yes/No?

Thanks!
 
May be you can changing it to a textfield and using a combo with Value list Yes;No;NA

________________________________________________________
Zameer Abdulla
Help to find Missing people
You may be the boss' pet; but you are still an animal
 
why would you want to store n/a generally what I do is
1,0 = true or false and then leave the field null if N/A

then when I do an average the nulls don't count as part of the average
 
Yes/No" fields are actually Booleans (i.e. numerics with values restricted to -1=Yes or 0=No). There's no way to store something like "NA" in them. As ZmrAbdulla suggests, probably a text field restricted to the values "Yes", "No" or "NA" is the way to go.
 
Thanks to all - I'll go with the text field option. I can't use the null option because the NAs actually count in some of the averaging!
 
you could also make 3 new fields in the db called
Y
N
N/A
and add a yes/no checkbox for each.
 
dolfan1873, why 3 fields for ONE attribute ?
 
why 3 fields for ONE attribute

We could stick with one field but have three option boxes to set a single field to True, Null, or False. Three toggle buttons might look better.

Shouldn't use three tick boxes because the user can tick all three of them. Option boxes are mutually exclusive.

Geoff Franklin
 
Geoff, 3 controls (in a frame ) for one field is OK for me.
Don't confuse presentation layout with data storage.
 
Wow - thanks for all of your responses!

I have to avoid null - the NA answer has to be counted in some of the roll up, so it can't be considered null.

The option group is the best option (!) for me to use, to avoid the possibility of more than 1 answer being selected.

As for the data type in the table - would you suggest any validation rules?
 
Option buttons can have triple states in access 2003 if thats any help.


Ian Mayor (UK)
Program Error
Programmers do it one finger at a time!
 
you could use the if/then statement to clear other boxes as you check one if you use the 3 check boxes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top