the_net_2.0
Banned
- Local time
- Today, 05:40
- Joined
- Sep 6, 2010
- Messages
- 812
All,
Here is a where clause that you can use in an access query to determine if any given bit in a value is turned on:
That code will return records where bit #7 in ''FIELD'' is turned on. I poked around with this, and it seems as though this only works for values that represent one bit only. For example, values like these:
Can someone offer me a little mathematical explanation of why this works (e.g. - always dependable) for a single bit, but not for multiple bits?
That would be great. Thanks!
Here is a where clause that you can use in an access query to determine if any given bit in a value is turned on:
Code:
WHERE ((((TABLE.FIELD Mod 128)\64) = 1) = True)
That code will return records where bit #7 in ''FIELD'' is turned on. I poked around with this, and it seems as though this only works for values that represent one bit only. For example, values like these:
- 128
- 256
- 512
- 16
- etc...
- 129
- 257
- 536
- 19
- etc...
Can someone offer me a little mathematical explanation of why this works (e.g. - always dependable) for a single bit, but not for multiple bits?
That would be great. Thanks!