Report on All Departments??

N

normanf

Hi there,

I would want to report on wastage material produced for
all departments. I would want to include as well the
departments that have not produced wastage material??

I have table department that lists 17 departments. Table
Wastage lists all departments which progressivly have /
had produced wastage. How could I include the missing
department(s, which are not included (as jet) in the
wastage table???

Any suggestions??
 
A

Allen Browne

1. Create the query with both tables (Departments and Wastage).

2. In query design view, double-click the line joining the 2 tables.
Access pops up a dialog with 3 options.
Choose the one:
All records from Departments, with any matches from ...

This is known as an outer join. More information in the 2nd part of this
article:
http://members.iinet.net.au/~allenbrowne/casu-02.html
 
G

Guest

Allen,

thanks for your reply!
I found the answer that I was looking for. I created a
Union query, as the outer joint wasn't giving me the
results I was lloking for.

SELECT TblDept.Departments, 7 AS Deptno, 0 AS
Numemployees, 0 AS TotalWastage
FROM TblAHS
WHERE (((TblDept.Departments) Not In (SELECT DISTINCT
TblWastage.Deparments FROM TblWastage WHERE
(((Tblwastage.Type2)=-1));
)));

thanks again.

regards Norman
 
Top