Yes/No fields

  • Thread starter Thread starter kev
  • Start date Start date
K

kev

Hi folks:

I want to use yes/no fields but I am a little wary of
doing so, when I can use a Byte type field with values 0/1
instead. I'm interested in the Yes/No field because it
only requires 1 bit instead of 1 byte. I just don't trust
it yet.

Is there anything nasty about yes/no fields that I should
be aware of? What does access really store for the value
of this field? Is it always -1/0 or does it depend on the
format and display control? Is it equivalent to the
SQL 'bit' datatype? In code, can I refer to the value in
various ways (true/false, yes/no, -1/0, on/off)?

Is it just easier to use the Byte type instead?

Thanks for any help.
 
The Yes/no field type is always -1 for true and 0 for false.
In VBA code or SQL statements, you can use the words True and False.

The only limitation is that it literally contains only True of False: Null
is not an option.
 
Back
Top