This example shows what works, however, there are six other positions besides System Operator in the same table and I need to count how many times this 'Person' is displayed in the other positions as well.
One record's 'Person' can be a System Operator and in another the 'Person' can be the Engineer. So I want a query that would be able to count how many times this 'Person' was an engineer or system operator in the same query.
When I add a Count()
function for Engineer it only attempts to return values in which the person is both an Engineer and System Operator and I'm looking to count how many times this person was either distinctly.
Sample Data would include the following:
Table Name: TblEventPersonnel _______________
Table Fields: Start Date, Car, State, Test Manager, System Operator, Engineer One, Engineer Two, Trainee One, Trainee Two
Every Test Manager, System Operator, Engineer one, Engineer Two, Trainee One, Trainee Two is a 'Person' say "Bob"
And I need a query that can count how many times Bob is a System Operator, Engineer one, Engineer Two, Test Manager, Trainee one, Trainee two.
Ultimately, I need to generate a report or have a form that has a combo box with a list of people (Bob, Joe, Gregg) or all employees that when I select an individual it will tell me how many times that person was in each capacity. The code below returns the number 4.
SELECT Count(tblEventPersonnel.[System Operator]) AS [CountOfSystem Operator]
FROM tblEventPersonnel
GROUP BY tblEventPersonnel.[System Operator]
HAVING (((tblEventPersonnel.[System Operator]) Like "Person"));