Selecting only some dates from a calendar

djchapple

Registered User.
Local time
Today, 17:15
Joined
Dec 24, 2005
Messages
41
I am totally new to Access and this is my first database.

I have a database for volunteers in which one table is basically a calendar. In this table I have fields for the month, day of the week (i.e Monday) and day of the month (i.e 21st). There is also a filed called "Special days"

Sometimes I may want to produce a report that selects only certain days such as Saturday, Sunday and other days marked as "special days". Another time I may also want to produce a report that selects other days.

At the moment I have a "test filed" in which I place a 1 for those days i want to select then I choose all those with a 1. This is obviously a very poor construction.

Can anyone offer me a more advanced method?
 
Food for thought...

For every database that you build, consider 'growth' in the form of time and/or information.
Look at your people table...
Do you have a field for each person's name? No-that would be silly, you have a row for each person, so that more info means more rows...it always grows in rows!
Now look at your calendar table...
As more days, months, and years unfold on the horizon of time, what happens?
In my opinion, you should have one or more matching rows in the calendar table for each person in the people table:

People Table
PersID (primary key for this table)
Lname
Fname
etc...

Calendar Table
PersID (related to people table)
SlotID (primary key for this table)
SlotDateTime
SlotRemarks
etc...

If you are dealing with fixed dates and time slots, you may still want to make a table where you add all of the eligible slots and use that as a lookup table.
The bottom line is, all you need to store against a person is the date/time slot info for each of the slots they are taking.
You can include controls on your form that will not offer a slot if it's already filled, etc...

Working out this structure is THE most important thing to get your application off to a good start (and a good finish).

Remember, the header of my post is "Food for thought"...it is just that.
 

Users who are viewing this thread

Back
Top Bottom