[AccessD] checkbox concatenation

Stuart McLachlan stuart at lexacorp.com.pg
Tue Oct 31 10:08:09 CST 2006


On 1 Nov 2006 at 1:44, Stuart McLachlan wrote:

> You would need to bit mask  the attendance to find out which events were
> attended which means your Events would need to be numbered
> 1,2,4,8,16,32,64..... You would be limited to a maximum of 63  events if you
> store it as a long (The 63rd event would be EventID 9223372036854775808)

Doh!
You can actually store 64 events.

Event 1 =  2^0 (1)
Event 64 = 2^63 ( 9223372036854775808)

You would record attendance at Event X as 
Attendance = Attendance OR 2 ^(X-1)




-- 
Stuart





More information about the AccessD mailing list