Hi,
Just wonder if anyone might be able to help me here. I have a question on Access report. I have a database built using Access 03. I have a report that has a several subreports whose control sources are based on queries.
Sometimes, there are occasions where in the sub-reports, there are a set of records showing lots of zeros (0) as follows
Activity Project 2008/9 2009/10 2010/11
cleaning MAG 0 0 0
moping MAG 0 0 0
...
or a bit of both
Activity Project 2008/9 2009/10 2010/11
WasteRubbish MAG 0 0 0
Wood collect MAG 5 4 9
Cleaning MAG 0 0 0
What i would like to happen is if it's zeros across the board, treat it as "no data" or don't show it at all or blank
so, the first example used as above would be
Activity Project 2008/9 2009/10 2010/11
The second example is
Activity Project 2008/9 2009/10 2010/11
Wood collect MAG 5 4 9
I know that this can perhaps be achieved via query. but is there any way of doing this on the report itself rather than on query (i wasn't allowed to touch the query in the sub-reports). I was attempting to hide the details using the VBA codes if all zeros are found across the years as follows but got errors
If Me.TB_Year1_Sum = 0 And Me.TB_Year2_Sum = 0 And Me.TB_Year3_Sum = 0 Then
Me.Detail.Visible = False
End If
Even if the above code i wrote worked, it will not work for the case where there is a case where there are some zeros records across all years and non-zeros records across the years.
BTW, TB_Year1_Sum, TB_Year2_Sum, and TB_Year3_Sum are located in the report footer.
Thank you in advance
Just wonder if anyone might be able to help me here. I have a question on Access report. I have a database built using Access 03. I have a report that has a several subreports whose control sources are based on queries.
Sometimes, there are occasions where in the sub-reports, there are a set of records showing lots of zeros (0) as follows
Activity Project 2008/9 2009/10 2010/11
cleaning MAG 0 0 0
moping MAG 0 0 0
...
or a bit of both
Activity Project 2008/9 2009/10 2010/11
WasteRubbish MAG 0 0 0
Wood collect MAG 5 4 9
Cleaning MAG 0 0 0
What i would like to happen is if it's zeros across the board, treat it as "no data" or don't show it at all or blank
so, the first example used as above would be
Activity Project 2008/9 2009/10 2010/11
The second example is
Activity Project 2008/9 2009/10 2010/11
Wood collect MAG 5 4 9
I know that this can perhaps be achieved via query. but is there any way of doing this on the report itself rather than on query (i wasn't allowed to touch the query in the sub-reports). I was attempting to hide the details using the VBA codes if all zeros are found across the years as follows but got errors
If Me.TB_Year1_Sum = 0 And Me.TB_Year2_Sum = 0 And Me.TB_Year3_Sum = 0 Then
Me.Detail.Visible = False
End If
Even if the above code i wrote worked, it will not work for the case where there is a case where there are some zeros records across all years and non-zeros records across the years.
BTW, TB_Year1_Sum, TB_Year2_Sum, and TB_Year3_Sum are located in the report footer.
Thank you in advance