Yes/No column questions

D

David

When I define a table column as Yes/No, what values can
the column actually contain? I set Required = No, so
presumably the column can contain 2 values plus Null.

In VBA what do I test for in this column?

Is there any way that adding a new column to the end of a
table and specifying 'required = No' can screw up exisitng
processing.
 
K

Ken Snell

Yes and True and On in ACCESS are stored as -1 bit number.

No and False and Off in ACCESS are stored as 0 bit number.

I usually test for True or False, or for -1 or 0.
 
J

Jeff Boyce

David

A variant on Ken's suggestion is to "force" null values to "False" in you
queries by using the Nz() function. Another spin, since not all back-ends
are Access, is to use False (I believe most all dbs use "0" for False), and
Not False (or <>0).

Good luck

Jeff Boyce
<Access MVP>
 
T

TC

An often misunderstood fact: boolean (yes/no) table columns *can never be
Null* in Microsoft Jet.

HTH,
TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top