I need to sum the value in a control in the footer, but cannot see the forest for the trees. In a nutshell, the txtTotCoLiab is calculated when the report runs and is called by the On Print event (code listed below) To simplify the code for posting, I made the retention a constant (150000). I am struggling now trying to get the sum of txtTotCoLiab print in the footer.
Is there enough information posted to give you an idea? Any ideas are greatly appreciated.
= = = = = = Start Code = = = = = = = =
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim curTotalIncurred As Currency
Dim curRetention As Currency
Dim curTotalPaid As Currency
Dim curTotOutStandReserve As Currency
Dim status as integer
‘ Current Retention will be changed at a later date to be a variable from the insurance table
curRetention = 150000
curTotalIncurred = [MedicalCost] + [Indemnity] _
+ [LegalCost] + [PropertyDamage] + _
[OtherCosts] + [OSMedReserve] + _
[OSIndemnityReserve] + [OSLegalReserve] _
+ [OSPropertyReserve]
curTotalPaid = [MedicalCost] + [Indemnity] + _
[LegalCost] + [PropertyDamage] + [OtherCosts]
curTotOutStandReserve = [OSMedReserve] + [OSIndemnityReserve] _
+ [OSLegalReserve] + [OSPropertyReserve]
If ClaimClosed = True Then
Status = 2
Else Status =1
End if
Select Case
Case 1
If curTotalIncurred curRetention Then
Me.txtTotCoLiab = curRetention – curTotalPaid
End If
Case 2
If curTotalIncurred curRetention Then
Me.txtTotCoLiab = (curRetention – curTotalPaid)*LDF
End If
End Select
End Sub
= = = = = = End Code = = = = = = = =
Ken