Bit Value

0 1

1 2

2 4

3 8

4 16

and so on..

bit 1 is turned on when

((MyFlagValue /2^1) MOD 2) = 1

bit 1 is not on when

((MyFlagValue /2^1) MOD 2) = 0

bit 4 is turned on when

((MyFlagValue /2^4) MOD 2) = 1

bit 4 is not turned on when

((MyFlagValue /2^4) MOD 2) = 1

So say you have a flag field called TestFlag

TestFlag has a value of 17.

You want to find out if the 4th bit is on. Normally you would test as follows

If ((TestFlag AND 16) = 16) Then....

If that expression is True then the bit is on

In Access querys and such you need to use

IIF( (([TestFlag] /2^4) MOD 2) = 1 , True, False)