johncollier1
Registered User.
- Local time
- Yesterday, 16:08
- Joined
- Mar 17, 2013
- Messages
- 17
I have a created a very simple application that I want to use to track how often I have to remind employees to ware their PPE. So I have a two table database. One table for the employee names and their status, status being the number of times I’ve had to remind them about their PPE in the last twelve months e.g. Jims been told twice, his [Status]=2, Fred’s been told three times in the last twelve months so his [Status]=3 and so on.
The other table records the incident, so [EmployeeID] and a date field. Very simple
However what I want to do is create a named Macro that performs an aggregate function on the incident table to work out how many times an employee has been spoken to in the last twelve months, and then use that aggregate to update the [Employee].[Status] field in the employee table.
I’ve tried several approaches to achieve this with little success. The logic just escapes me.
Can anyone point me in the right direction? This thing is driving me to distraction :banghead:
The other table records the incident, so [EmployeeID] and a date field. Very simple
However what I want to do is create a named Macro that performs an aggregate function on the incident table to work out how many times an employee has been spoken to in the last twelve months, and then use that aggregate to update the [Employee].[Status] field in the employee table.
I’ve tried several approaches to achieve this with little success. The logic just escapes me.
Can anyone point me in the right direction? This thing is driving me to distraction :banghead: