Employee working hours tracker table design?

siamandm
BronzeLounger
Posts: 1226
Joined: 01 May 2016, 09:58

Employee working hours tracker table design?

Post by siamandm »

Hello All,
I would like to create a database for tracking the working hours for employees, and I came with this design below, I would like to see your suggestion if it's wrong and what is the correct way to do it?
Excel sample data.jpg
EmployeeWorkingHoursTracker.jpg

regards
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78475
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Employee working hours tracker table design?

Post by HansV »

Do you have a specific reason for storing the date and time in separate tables? If I were to design such a database I would store them in the same table.
Best wishes,
Hans

siamandm
BronzeLounger
Posts: 1226
Joined: 01 May 2016, 09:58

Re: Employee working hours tracker table design?

Post by siamandm »

you mean I need something like this?
EmployeeWorkingHoursTracker2.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78475
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Employee working hours tracker table design?

Post by HansV »

Yes, indeed.
Best wishes,
Hans

siamandm
BronzeLounger
Posts: 1226
Joined: 01 May 2016, 09:58

Re: Employee working hours tracker table design?

Post by siamandm »

Thank you very much

siamandm
BronzeLounger
Posts: 1226
Joined: 01 May 2016, 09:58

Re: Employee working hours tracker table design?

Post by siamandm »

HansV wrote:
05 Jun 2021, 14:28
Do you have a specific reason for storing the date and time in separate tables? If I were to design such a database I would store them in the same table.
Dear Hans, what if I want to choose the date one time for the employee as shown in this form below :
Last edited by siamandm on 06 Jun 2021, 10:26, edited 3 times in total.

User avatar
HansV
Administrator
Posts: 78475
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Employee working hours tracker table design?

Post by HansV »

You could use the Before Insert event of the form:

Code: Select all

Private Sub Form_BeforeInsert(Cancel As Integer) 
    Me.WorkingDate = Me.txtDate
End Sub
where txtDate is the text box in the header. As soon as you start to enter anything in a new record, the date will be filled in.
Best wishes,
Hans

siamandm
BronzeLounger
Posts: 1226
Joined: 01 May 2016, 09:58

Re: Employee working hours tracker table design?

Post by siamandm »

thank you very much .. as usual working very good :)