Comboboxes versus Checkboxes

AirCounsel

New member
Local time
Today, 15:23
Joined
May 4, 2012
Messages
8
I've created an Access database to manager the activities of a school. I have a "contacts" table where I enter general information about all contacts and a "workers" table linked to the contacts table, containing specific information about workers, such as availability, abilities, etc. I've set up a form for the contacts, containing a subform linked to the workers table, which I only make visible if a checkbox "worker" is checked. What I want to do is show the days each worker is available to work on the subform. The only way I know how to do this is by adding a column for each day of the week to the workers table, with boolean yes/no type and then show the values of each columns with a yes on the form. I think that would do the trick, but I have a feeling that a different method, perhaps using a combobox would be better. The form will be used not only to show the data, but also to update the related tables. Any thoughts? I so, can you provide enough details so a newbie like me can follow? Thanks!
 
If you want the five or seven "boxes" to just indicate if a person works on respective day then you would use a Check Box or Text Box.

A Combo Box gives you the ability to click and select an option.
This would be suitable if you wanted to change the status of a day.

Check Boxes have very limited use compared to combo boxes.

See this link on why not to use Yes/No http://allenbrowne.com/casu-23.html
 
PNGBill,

Great suggestion! The link you provided led me to a tutorial that explains exactly what I'm trying to do. Thanks!
 
Even though it is highly unlikely that the number of days in a week will ever change, it is still a violation of first normal form to store all seven days as columns in a table. The better solution is to create a second table and in this table will be one row per person for each day thay can work so Sally can work M and T and so has 2 records. Joe can work M, W, F and so has 3 records. You would use a subform to display the days available. Add a row to add another day, delete a row to delete a day.
 
Pat, I clicked on the link provided by PNGBill and followed those instructions to normalize the database. However, in the original design I had a field in my "workers" table named "Day Availability" and used the lookup wizard to get the days of the week from a separate table. Now, I have a third table named WorkersDays which combined the tables "Workers" and "Days of the Week.' I removed the "Day Availability" field from the "Workers" table and made sure the relationships were set up as instructed. However, I'm having trouble showing this stuff on a form and subform using a combobox as suggested. I'd appreciate any detailed help you can provide. Here's how the tables were set up:

Workers:
WorkerID: AutoNumber
Education: Text
Other: Text

Days of the Week:
DayID: AutoNumber
Day: Text

WorkersDays:
WorkerDayID: AutoNumber
WorkerID: Number
DayID: Number

Then I set the one-to-many relationship between Workers and WorkerDays
And another one-to-many relationship between Days of the Week and WorkersDays
 
Last edited:
Day can not be a field name - it is a reserved word.
Google Hungarian Naming Convention

The list of Reserved Words is "as long as a pce of string".
Best way to avoid using same is to use double or triple names
eg WorkDay rather then Day
TeacherName, ClassRoomNumber, tblWorkers, EducationDescrip, WorkersOther, DaysOfTheWeek
 

Users who are viewing this thread

Back
Top Bottom