Table records

alletorre

New member
Local time
Today, 14:43
Joined
Dec 2, 2011
Messages
6
I have a work database used to track employee vacation dates. Each employee is able to select three date segments in a year. My table records each segment as startdate1, enddate1; startdate2, enddate2; startdate3, enddate3. I then use a query to concatenate these columns into Segment1; Segment2 and Segment3. I use a form to make the entries into the table and a couple of reports are generated with the information contained in the table. I can't seem to create a report with each date segment listed individually sorted by month. I feel I should split each employees record into three individual records into a new table so that my report will list each employees dates as individual rows. This will allow me to generate the report sorted by month. I cannot figure out how to do this. I'm not very access savvy. Help?
 
Data structure is the problem. There should be only one field for StartDate and one for EndDate. Each vacation period is a separate record.
 
I tried that as well but then I could not figure out how to generate a report that listed all three dates for each employee on one page. Am I just overlooking something super simple to accomplish this?
 
Look up the topic of NORMALIZATION (on this forum) or DATABASE NORMALIZATION (via web search) and learn about parent/child table relationships.

You are trying to combine apples and oranges into one table and it is a pretty messy piece of fruit salad.

As Galaxiom has mentioned, people are not vacations and vacations are not people. Those two entities don't belong in the same table. Split the table (as you commented) and you can then drive the report from the vacations table if you need to do so.

The way to make this happen on a single report is to build the report on a query that joins employee data to vacation data using the employee's ID number (corporate ID, or whatever you are using for unique numbers) as the link between the tables.

Then you can get a report wizard to do everything else for you including grouping vacations by employee so that you get an alphabetic list of employees and a date-sorted detail subsection of vacations.
 

Users who are viewing this thread

Back
Top Bottom