[AccessD] Checkboxes/MultiSelect Listbox - What's Best?

DWUTKA at marlow.com DWUTKA at marlow.com
Mon Feb 16 20:04:46 CST 2004


Not sure why a handful of boolean fields is not normalized..... 

However, Jet does two bytes for a boolean field.  Which is a waste of 15
bits! However, Unless you have a ton of records and/or have a massive amount
of boolean fields, the space wasted is negligible.

However, if you really want a method to cram them into one field, I would
recommend a simple Byte field, versus a string field.  First of all, with a
string field, you will be using more space.....sort of.  At a minimum, a
string field takes up one byte. (Which tells Jet how long the data in the
field is.).  Then you would have 2 bytes (A97, and ASCII) per item, in your
example (AS, DI, etc.).  However, with a Byte Field, you have 8 bits to turn
'off' and 'on', so you can represent up to 8 'programs' with one byte field.

Still don't see a real advantage here.....unless you are dealing a heavily
coded interface, then dealing with the bits is going to be faster then
pulling strings apart.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Terri Jarus
Sent: Monday, February 16, 2004 3:56 PM
To: access Developers discussion and problem solving
Subject: [AccessD] Checkboxes/MultiSelect Listbox - What's Best?


I'm redesigning an existing database that is not fully normalized.  Here is
an example where I'm not sure the best way to handle.  Current db has a
field (Boolean) for each program:  AS, DI, MS, SS, LB, NU for example and
the user checks the applicable box(es) that are related to their contract.
 
I was going to use a Multiselect Listbox and have it save a string value to
the field Programs - but, I would  need the string value to be in a
consistent order.
 
Another idea would be to save a record for each program in a Programs table.
 
Which is the best route to follow?  Any suggestions?
 
If you need more information, just let me know.  Thank you for your input.
 
Terri Jarus
Director, Contract Support Services
jarus at amerinet-gpo.com
314-542-1902


---------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individuals or entities to whom they
are addressed. If you have received this email in error please return
it to the sender, and erase any copies thereof.
Copyright 2004 Amerinet 1nc.
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list