Timesheet Totals (1 Viewer)

kristy0330

New member
Local time
Yesterday, 19:38
Joined
Nov 28, 2018
Messages
1
I have a timesheet form which the user selects a date to post time against and a subform where they record daily transactions for multiple employees. I would like to display on the form or subform a daily subtotal of ST hours for the current employee selected and a weekly subtotal of ST hours. Currently, I am only able to get it to subtotal daily ST Hours for all employees keyed to that day.

Control Source for my subtotal field txtDailyST
=DSum("[tcDailyST]","[qryDailyHours]","[tcEmployeeID]='" & [tcEmployeeID] & "'" & " And [tcDate]= '" & [tcDate] & "'")

I also tried something like.. =IIf(([tcEmployeeID]=[tcEmployeeID]) And ([tcDate]=[TcDate]),Sum([tcSTHours]),"0.00")

Help!
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:38
Joined
Oct 29, 2018
Messages
21,467
Hi,

Is the problem with not knowing what to use for the date criteria to cover the week? If so, could you please define for us first what the current week means? Is it starting on Sunday?
 

Minty

AWF VIP
Local time
Today, 01:38
Joined
Jul 26, 2013
Messages
10,371
I think I would simply create a saved totals query that calculated all employees weekly hours, grouped by year and week number, then use a dlookup on that query to get the current data,

Alternatively link that query to your current forms datasource and display it joined by empID and with the current weekdate as criteria
 

Users who are viewing this thread

Top Bottom