Sam Summers
Registered User.
- Local time
- Today, 19:45
- Joined
- Sep 17, 2001
- Messages
- 939
Hi,
Ultimately i am going to display a percentage utilization of different groups of personnel in a report by using 2 textboxes, 1 with the count of the whole group and the 2nd with the count of those who are working.
I will have a third Textbox which will give me the % utilization.
I have this query which gives me the total of the group and is working fine:
SELECT DISTINCTROW Employee.National, Count(*)
AS [Count Of Employee]
FROM Employee
GROUP BY Employee.National
HAVING (((Employee.National)=No));
_____________________________________________________________
But i have this one that i want to display only those from the group who are working? But instead of 1 record displaying the total i get 4 records each displaying 1?
SELECT DISTINCTROW Employee.National, Count(*)
AS [Count Of Employee]
FROM Employee
GROUP BY
Employee.National,
Employee.EmployeeID,
Employee.FirstName,
Employee.Surname,
Employee.MobDate,
Employee.DeMobDate
HAVING (((Employee.National)=No)
AND ((Employee.MobDate) Between Date() And Date()-7))
OR (((Employee.National)=No)
AND ((Employee.DeMobDate) Between Date() And Date()-7));
_________________________________________________________
My guess is that it is due to the final 4 lines (HAVING, AND, OR, AND) but how do i just display 4 (i.e the Count)?
Many thanks in advance
Sam
Ultimately i am going to display a percentage utilization of different groups of personnel in a report by using 2 textboxes, 1 with the count of the whole group and the 2nd with the count of those who are working.
I will have a third Textbox which will give me the % utilization.
I have this query which gives me the total of the group and is working fine:
SELECT DISTINCTROW Employee.National, Count(*)
AS [Count Of Employee]
FROM Employee
GROUP BY Employee.National
HAVING (((Employee.National)=No));
_____________________________________________________________
But i have this one that i want to display only those from the group who are working? But instead of 1 record displaying the total i get 4 records each displaying 1?
SELECT DISTINCTROW Employee.National, Count(*)
AS [Count Of Employee]
FROM Employee
GROUP BY
Employee.National,
Employee.EmployeeID,
Employee.FirstName,
Employee.Surname,
Employee.MobDate,
Employee.DeMobDate
HAVING (((Employee.National)=No)
AND ((Employee.MobDate) Between Date() And Date()-7))
OR (((Employee.National)=No)
AND ((Employee.DeMobDate) Between Date() And Date()-7));
_________________________________________________________
My guess is that it is due to the final 4 lines (HAVING, AND, OR, AND) but how do i just display 4 (i.e the Count)?
Many thanks in advance
Sam