Yes/No Field Problem

aqif

Registered User.
Local time
Today, 20:37
Joined
Jul 9, 2001
Messages
158
Hi All
smile.gif


I've got a database which has got lots of yes/no type fields. I have declared yes/no datatype for these fields and using the yes/no control on the form. The problem is that when i see table..instead of storing yes or no it shows the picture of that yes/no control i.e tick box. If i make my field as text n use yes/no tick box control on the form it stores -1 for yes n 0 for No. I want to store actual yes and no n also want to use yes/no tick box on the control. How can i do that?

Cheers!
Aqif
 
Your table is storing the data correctly, why do you need it to show yes/no in the table?
 
Yes/No is a boolean datatype. It allows only two values. 0 for false and -1 for true. The default display for this type of field is checkbox. If you open the table in design view, select the field you want to change, and go to the lookup tab, you can change the display control to textbox. If you have already built any forms or reports from this table, changing the display will not affect previously built objects, you'll need to change them yourself.

Also look at the format property on the general tab. You can choose Yes/No, True/False, or On/Off as display values.

Don't forget though that Access is going to store this data as numeric values of 0 or -1 no matter what the rest of the properties are set to. They only affect the display of the data.

When you are typing data into the field, "Yes", "True", "On", and -1 all result in the same value regardless of what the display type says.
 

Users who are viewing this thread

Back
Top Bottom