In database design, we aim to never store redundant data.
A lesser but useful goal is to reduce the amount of typing for the data
entry operator.
Your EmployeeDetails table is good. The TimeSheet table needs only:
EmployeeNumber Number (Long) Foreign key to EmployeeDetails.
StartDateTime Date/Time Date and time started work.
EndDateTime Date/Time Date and time finished work.
To create the relationship:
Tools | Relationships.
Drag EmployeeDetails.EmployeeNumber onto Timesheet.EmployeeNumber
User entry form will be a continuous form, with:
combo box for selecting the employee,
text box for StartDateTime
text box for EndDateTime
From that simple information, Access can give you the day name (from the
date) and the hours worked (difference between start and end times). The
structure even copes with shifts that span midnight if that's ever needed.
For help on how to calculate the time worked, see:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Doslil" <doslil@hotmail.com> wrote in message
news:c677919e.0312041406.2d676035@posting.google.c om...[color=blue]
>
> I am designing tables for a timesheet project.The details of the table
> are as follows
>
>
> Employeedetails (tableName)
>
> EmployeeNumber
> SocialSecurity
> Title
> Position
>
> TimeSheet(tableName)
>
> EmployeeNumber
> date
> Day
> TimeIN
> TimeOut
> TotalHrs
>
> EmployeeWorkSiteDetails(table Name)
>
> Employee Number
> WorkSite
> Date
> Day
>
> I have created a relationship b/w
> Employeedetails.EmployeeNumber - TimeSheet.EmployeeNumber
> EmployeeDetails.EmployeeNumber -
> EmployeeWorksitedetails.EmployeeNumber.
>
> On the form When the user enters Timesheet details , I need to insert
> the WorkDate and Day from the timesheet table into
> EmployeeWorkSiteDetails.Workdate and EmployeeWorkSiteDetails.Day.
>
> So do I have to create a relationship b/w Timesheet and
> EmployeeWorksiteDetails.
> And also How do I set the join types/Join properties when creating a
> relationship.Do I keep it to default
> Any input is highly appreciated
>
> Thanks[/color]