Hello,
I need to create a report where in addition to daily grandtotals, I have to output daily grand totals for all locations that are "Health Connect". When running the report, I find that while my daily grandtotals for the entire day are correct, my daily Health Connect grandtotals are twice the expected value. When I put a msgbox code in the location footer to output the location, each location appears twice in the msgbox output. I'm not sure what's going on, but I think it has something to do with the format count property
Option Compare Database
Option Explicit
Dim dblDailyTotal As Double
Private Sub DateFooter_Format(Cancel As Integer, FormatCount As Integer)
Me.txtHCDailyTotal = dblDailyTotal
End Sub
Private Sub LocationFooter_Format(Cancel As Integer, FormatCount As Integer)
Dim intLocCounter As Integer, strLocation As String
strLocation = Mid(Me.Location, 1, 14)
If strLocation = "Health Connect" Then
dblDailyTotal = Me.Total_Amount + dblDailyTotal
End If
End Sub
Private Sub LocationFooter_Format(Cancel As Integer, FormatCount As Integer)
MsgBox "Location " & Me.Location
End Sub
I need to create a report where in addition to daily grandtotals, I have to output daily grand totals for all locations that are "Health Connect". When running the report, I find that while my daily grandtotals for the entire day are correct, my daily Health Connect grandtotals are twice the expected value. When I put a msgbox code in the location footer to output the location, each location appears twice in the msgbox output. I'm not sure what's going on, but I think it has something to do with the format count property
Option Compare Database
Option Explicit
Dim dblDailyTotal As Double
Private Sub DateFooter_Format(Cancel As Integer, FormatCount As Integer)
Me.txtHCDailyTotal = dblDailyTotal
End Sub
Private Sub LocationFooter_Format(Cancel As Integer, FormatCount As Integer)
Dim intLocCounter As Integer, strLocation As String
strLocation = Mid(Me.Location, 1, 14)
If strLocation = "Health Connect" Then
dblDailyTotal = Me.Total_Amount + dblDailyTotal
End If
End Sub
Private Sub LocationFooter_Format(Cancel As Integer, FormatCount As Integer)
MsgBox "Location " & Me.Location
End Sub