Microsoft Access
(1)
XP
(1)
TripleState
(1)
Vista
(1)
MVP
(1)
CellThis
(1)
JET
(1)
FBF
(1)

Yes/No Data Types

Asked By Peter Marshall
17-Apr-07 08:28 AM
I have defined a Yes/No data type field with a Default Value of nothing
(neither Yes nor No).  However, when records are created without indicating
Yes or No for that field and I query the Yes/No field, they act as if they
are a No, when in fact I thought they would be a null.  What's the trick
with Yes/No fields?

Peter Marshall
Manager Information Services
Ohio Coatings Company
(740) 859-5560 office
(304) 281-7404 cell

This might be a Mission Impossible.

Asked By JerryWhittl
17-Apr-07 09:54 AM
This might be a Mission Impossible. A Yes/No field can contain only two
values: Yes or No. If you don't put anything in them, they default to No
(which is actually stored as 0).

Access does support triple state checkboxes but not at the table default
level. You can read more about it here:

http://www.databasedev.co.uk/triplestate_checkbox.html

Personally I think that this is a misuse of Yes/No fields as boolean logic
says that it's one or the other. You might want to consider an Option Group
instead if there can be three values.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

As Jerry explained, the Yes/No data type in Access is capable of handling 2

Asked By Allen Browne
17-Apr-07 10:16 AM
As Jerry explained, the Yes/No data type in Access is capable of handling 2
states only. Null is not supported.

To get a 3-state field, use a field of type Number, size Integer, with the
Display control set to Check Box, and the check box's TripleState property
set to Yes. In Access 2003 or 2007 on Windows XP or Vista, you may want to
turn of Windows Themed controls: otherwise you cannot see an visible
difference between False and Null.

JET's inability to handle nulls is a major problem in Access. Of course, you
still get Null in Yes/No fields (e.g. in a query with an outer join.) If you
then try to operate on the yes/no field, Access will crash. Or if you are
lucky, it just gives senseless errors such as this example:
http://allenbrowne.com/bug-14.html

It may be wise to avoid yes/no fields all together, and use Integer fields
instead, so as to avoid these bugs and crashes.

--
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
Post Question To EggHeadCafe
they default to No (which is actually stored as 0). Access does support triple state checkboxes but not at the table Group instead if there can be three values. - - Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder As Jerry explained, the Yes / No data type in Access is capable of handling 2 states only. Null is not control set to Check Box, and the check box's TripleState property set to Yes. In Access 2003 or 2007 on Windows XP or Vista, you may want to turn of Windows Themed s inability to handle nulls is a major problem in Access. Of course, you still get Null in Yes / No fields you then try to operate on the yes / no field, Access will crash. Or if you are lucky, it just gives so as to avoid these bugs and crashes. - - Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http: / / allenbrowne
DataBase deployment issues of Access XP, Access 2003, and Access 2003 On my advice, a long time ago, a customer purchased the Access XP developer edition. That special Office XP version of Access was supposed to allow the Access developers to deploy Access XP applications within their organizations so that they did not
to Access2007 I try to open a database designed in Microsoft Access XP , in Microsoft Access 2007. All forms and tables seems to be ok but Add your folder as a trusted location under: Office Button | Access Options | Trust Center | Trust Center Settings - - Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http: / / allenbrowne.com / tips.html Reply to group, rather Access2007 description: I try to open a database designed in Microsoft Access XP , in Microsoft Access 2007. All forms and tables seems
DataBase Multiple Queries for Microsoft Access Report I am using Microsoft Access XP. I have three queries that I would like an Access Report to pull data from. I have been getting difficulty data. . . More info, please. . . - - Regards Jeff Boyce www.InformationFutures.net Microsoft Office / Access MVP http: / / mvp.support.microsoft.com / Microsoft IT Academy Program Mentor http: / / microsoftitacademy.com / Jeff: My data
DataBase Microsoft Access Training There are still spaces on the "Microsoft Access Power Mastery" course before I commence work on the Access 2010 version. There really is no substitute for learning Microsoft Access from the ground up from a Microsoft certified professional. http: / / access-databases.com / ms-access-tutorial / I walk you through every step of creating your
DataBase Microsoft Access Training There are still spaces on the "Microsoft Access Power Mastery" course before I commence work on the Access 2010 version. There really is no substitute for learning Microsoft Access from the ground up from a Microsoft certified professional. http: / / access-databases.com / ms-access-tutorial / I walk you through every step of creating your
a customers site putting in a new system. They use Microsoft Access XP on all their computers. When I hooked up the new to the workgroup, we got this message when trying to access the database. Microsoft Access Cannot open this file. This file is located outside your intranet or on an untrusted site. Microsoft Access will not open the file do to potential security problems work on them from the shared folder except for the Access file. Any ideas about what to check would be helpful a customers site putting in a new system. They use Microsoft Access XP on all their computers. When I hooked up
DataBase Access XP and Access 2003 sharing a system.mdw file Hi, We run a 3rd party application here built on Access XP. The same mde file will run under Access 2003, with one problem. It's a secured multiuser app s the problem. On some of the servers, once an Access 2003 client has logged in to the system.mdw file, no Access XP clients can log in. The error message is Microsoft Access couldn't find file '. . . . . \ system.mdw'. This file is