From: Molasses26 on
In Access 2003 I have a report based on a crosstab query that displays the
total number of checks deposited by month to different banks for two years
and the difference between the current and previous year each month. I need
to know if there is a way to only display the montly data if there is a row
for both years. We only started tracking the data in April of 2009 so...
The Query data looks like this:
DepYr DepMoNbr BOA JPMC WllsFar DepMo
2009 04 3000 2624 1012 Apr
2009 05 2954 2326 1024 May
2009 06 3004 2459 1063 Jun
2009 07 ~~~ etc. up to May of 2010
2010 04 3583 2789 1193 Apr
2010 05 3548 2753 1127 May

The report looks like:
DepMo DepYr BOA JPMC WllsFar
2010 1234 2345 3456 Detail row
Jan 1234 2345 3456 DepMoNbr footer
2010 4567 5678 6789 Detail row
Feb 4567 5678 6789 DepMoNbr footer
2010 2341 3452 4563 Detail row
Mar 2341 3452 4563 DepMoNbr footer
2009 3000 2624 1012 These two rows are in the Detail
2010 3583 2789 1193
Apr 583 165 181 DepMoNbr footer
2009 2954 2326 1024 These two rows are in the Detail
2010 3548 2753 1127
May 591 427 103 DepMoNbr footer
2009 1234 2345 3456 Detail row
Jun 1234 2345 3456 DepMoNbr footer
2009 1234 2345 3456 Detail row
Jul 1234 2345 3456 DepMoNbr footer
~~~ etc. thru the end of 2009.

I want to display only the rows where both years are present.
DepMo DepYr BOA JPMC WllsFar
2009 3000 2624 1012 These two rows are in the Detail
2010 3583 2789 1193
Apr 583 165 181 DepMoNbr footer
2009 2954 2326 1024 These two rows are in the Detail
2010 3548 2753 1127
May 591 427 103 DepMoNbr footer

Sorry this is so long and thanks in advance for any help!