Hello. I hope someone can help me. I have a report with several subreports. I am totaling $ amounts to get some statistics for our customer service department. I have subrptForecastSummary that shows the total $ amounts for each delivery area. I have an unbound text box in my report header that I want to total just areas 1 and 2 in. Not all 4 areas. I am not sure how to do this. I tried doing it with code but it only totals the area 1 it does not add area 2.
If [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Area] = "1" or "2" Then
Me.North = ([Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Total] + [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Options])
I also tried
Dim North1Total as Integer
Dim North2Total as Integer
If [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Area] = "1" Then
North1Total = ([Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Total] + [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Options])
If [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Area] = "2" Then
North2Total = ([Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Total] + [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Options])
End If
End If
Me.North = North1Total + North2Total
I get an overflow error with this. Anyone have an idea?
Thanks
Brandy
If [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Area] = "1" or "2" Then
Me.North = ([Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Total] + [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Options])
I also tried
Dim North1Total as Integer
Dim North2Total as Integer
If [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Area] = "1" Then
North1Total = ([Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Total] + [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Options])
If [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Area] = "2" Then
North2Total = ([Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Total] + [Reports]![rptCSInstallDetail]![subrptForecastSummary].[Report].[Options])
End If
End If
Me.North = North1Total + North2Total
I get an overflow error with this. Anyone have an idea?
Thanks
Brandy