C
CEV
Hi, I created a query with the help of this group. The query is no longer
working. It runs and comes up with some numbers, but I do not know where
these numbers are coming from because I believe they are incorrect. Here is
the query:
SELECT tblPositions.Department, Sum(Abs([Open])) AS CountOfYes,
tblPositions.Inactive
FROM tblPositions INNER JOIN tblEmployeePositions ON
tblPositions.PositionNumber = tblEmployeePositions.PositionNumber
GROUP BY tblPositions.Department, tblPositions.Inactive
HAVING (((Sum(Abs([Open])))=Yes) AND ((tblPositions.Inactive)=No));
The query is supposed to count how many "Open" check boxes are marked in the
tblPositions table. It totals the number up per department. It only counts
records where the "Inactive" check box is not checked.
The tblPosition table is only showing 30 positions marked as Open but the
Query comes up with a total count of 50. None of the 30 are marked as
Inactive. There are 9 records that are marked as Inactive but none of these
arte marked as Open.
I have no ideal why the query comes up with the number 50. Can you see
anything wrong with the Query above?
Thanks,
CEV
working. It runs and comes up with some numbers, but I do not know where
these numbers are coming from because I believe they are incorrect. Here is
the query:
SELECT tblPositions.Department, Sum(Abs([Open])) AS CountOfYes,
tblPositions.Inactive
FROM tblPositions INNER JOIN tblEmployeePositions ON
tblPositions.PositionNumber = tblEmployeePositions.PositionNumber
GROUP BY tblPositions.Department, tblPositions.Inactive
HAVING (((Sum(Abs([Open])))=Yes) AND ((tblPositions.Inactive)=No));
The query is supposed to count how many "Open" check boxes are marked in the
tblPositions table. It totals the number up per department. It only counts
records where the "Inactive" check box is not checked.
The tblPosition table is only showing 30 positions marked as Open but the
Query comes up with a total count of 50. None of the 30 are marked as
Inactive. There are 9 records that are marked as Inactive but none of these
arte marked as Open.
I have no ideal why the query comes up with the number 50. Can you see
anything wrong with the Query above?
Thanks,
CEV