True/False

  • Thread starter Thread starter David
  • Start date Start date
D

David

Learning Access and would like to know if there is any
advantage/disadvantage of using -1 or 0 instead of True
or False

Thanks in advance
 
Not as far as I'm concerned. You may see people who do things like sum the
value of a boolean field and reverse the sign to determine how many trues
have been selected, but I think it's a mistake to base things on the current
implementation of a value. After all, in VB.Net, True is now 1, not -1.
 
In my opinion, True and False are just symbolic constants for -1 and 0,
anyway.

I prefer to use True & False in code since they look more logical than -1
and zero.

In pure JET SQL, I also use True and False. If I use another SQL, e.g. SQL
Server, then I use <> 0 for True and = 0 for False since universally (I
think) 0 is logical False and logical True is represented differently in
different SQL (but True is <> 0 since 0 = False).
 
Back
Top