Question : Null sum in query

Okay, let's try again:

I have a database that I use to examine and evaluate training data to see what courses have been completed.  The native software that stores the records doesn't do this well.  I have multiple queries, all following the basic context shown below.  They all (8) feed a report that uses conditional formating to highlight those members that have not met the requirements.

The problem:

If a member has not completed training, the query reports a null and the member is dropped from the query.  Ergo, they are dropped from the report.  I need the output of the query to show a zero instead of a void.

Here is my SQL statement:

SELECT [GFES Staff Training Attendance].staff_id, Sum([GFES Staff Training Attendance].hours) AS SumOfhours
FROM [GFES Staff Training Attendance]
WHERE ((([GFES Staff Training Attendance].tra_code)="04.10.01"))
GROUP BY [GFES Staff Training Attendance].staff_id
ORDER BY [GFES Staff Training Attendance].staff_id;


Currently I am appending two tables (GFES Staff Training Attendance) and one called Control that contains dummy data (a zero sum category).  Although this works, it is a multistep process that I can do, but not my co-workers (we all use the data).  I have attempted to do the same with a UNION, but this crashed my database completely.

Any thoughts out there?

Answer : Null sum in query

Sorry - My mistytpe - you have called your staffid staff_id, so change the code and it should be ok.
Random Solutions  
 
programming4us programming4us