I am trying to build a data base for work and ran into a problem.
I have 10 different offices that have some of the same billets but not all that work in them.
Example:
Office
clerks
managers
accounting
2
2
shipping
2
0
admin
2
2
receiving
1
0
I have to display all the Offices on my report. Currently when I build my report if any billet has a ZERO value it will not display the office at all. How do I get my Query to display ZERO for the billets?
Chad
Last edited by HansV on 02 Mar 2011, 15:23, edited 1 time in total.
Reason:to present data in table format
Create a new query in design view.
Add the table listing the (unique) offices to the query and also your crosstab query.
Join them on the Office field by dragging the field from the offices table to the corresponding field in the crosstab query.
Double-click the join line and select the option to include ALL records from the offices table and only related records form the crosstab query, then click OK.
Add the Office field from the offices table to the query grid.
Add a calculated field like this, substituting the correct names:
Thank you for your quick reply. But I am sure i am not doing it right. I put in the formula that you recommended but it still does not include ZERO Values...
TblMCCRoster-Contains all offices
qryfy11TOMO-contains all billets
qryMONumbers - Contains all the people filling TOMO billets
qryfy11TOME-contains all billets
qryMENumbers - Contains all the people filling TOME billets
qryfy11TONO-contains all billets
qryMONumbers - Contains all the people filling TONO billets
qryfy11TONE-contains all billets
qryMONumbers - Contains all the people filling TONE billets
qryCIVNumbers - Contains all the people filling Civ Billets (have not built the query for available billets)
all Officers have the first four(Qryfy11MOTO, qryMONumbers, Qryfy11METO, qryMENumbers).
The rest of the queries do not have someone working in one or more of the Offices. Which is making my report and/or query not show all my offices.
I am working on scrubbing database down so I can attach it here for better help.
Chad
You do not have the required permissions to view the files attached to this post.
Last edited by magnumeng on 03 Mar 2011, 14:23, edited 1 time in total.
In the Design of qryRollup, double click each of the lines joining tblMCCRoster with each of the other queries, and change the Join type as shown below.
Repeat for all the joins.
JoinType.gif
You do not have the required permissions to view the files attached to this post.
HansV wrote:
Double-click the join line and select the option to include ALL records from the offices table and only related records form the crosstab query, then click OK.
Hans had actually told you to change the join type in his post as well.