I'm trying to run a query from a table with children ID, Date & Attended(which is a yes/no field) in the query criteria I would like a summary of the days attended(yes) for each child/ID. Any suggestions will be appreciated.
If you use this code, each time you run the query, it will ask you to "Enter Start of Period" and "Enter End of Period" and will then return the total hours worked per employee.
SELECT [Employee Attendance].[Employee#], Sum(round(24*([Employee Attendance]![Time Out]-[Employee Attendance]![Time In]),2)) AS [Hours Worked]
FROM [Employee Attendance]
WHERE ((([Employee Attendance].Date) Between [Enter Start of Period] And [Enter End of Period]))
GROUP BY [Employee Attendance].[Employee#];
Start a new query in Design Mode. Click the arrow on the View Icon which is the Left Most Icon on your Toolbar and select SQL View. Copy my code and paste it in and change any of the table or field names that may not be exactly what you have called yours. You do not need to change the [Enter Start of Period] and [Enter End of Period] because those are dynamic parameters that will ask you for this information each time the query is run, thereby allowing you to pick a different period each time.