hello everyone
this is the code behind my report, the only thing that i want to do is to sum the IDs that pop up ..
Private bContinuedSection As Boolean, sLastHeaderKey As Variant
Private Function IsContinuedSection() As Boolean
IsContinuedSection = bContinuedSection
End Function
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Re As DAO.Recordset
Dim Envi_Risk_Class, Risk
Set Re = CurrentDb.OpenRecordset("SELECT Envi_Risk_Class, HazardID FROM tblHazard Where Envi_Risk_Class ='" & Me!hiddenEnvi_Risk_Class & "' ORDER BY HazardID"
Risk = ""
Me!Risker = Me!hiddenEnvi_Risk_Class
Do While Not Re.EOF
Risk = Risk & Re!HazardID & ", "
Re.MoveNext
Loop
Me!ID = Left(Risk, Len(Risk) - 2)
End Sub
can someone give me an idea? thx
this is the code behind my report, the only thing that i want to do is to sum the IDs that pop up ..
Private bContinuedSection As Boolean, sLastHeaderKey As Variant
Private Function IsContinuedSection() As Boolean
IsContinuedSection = bContinuedSection
End Function
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim Re As DAO.Recordset
Dim Envi_Risk_Class, Risk
Set Re = CurrentDb.OpenRecordset("SELECT Envi_Risk_Class, HazardID FROM tblHazard Where Envi_Risk_Class ='" & Me!hiddenEnvi_Risk_Class & "' ORDER BY HazardID"
Risk = ""
Me!Risker = Me!hiddenEnvi_Risk_Class
Do While Not Re.EOF
Risk = Risk & Re!HazardID & ", "
Re.MoveNext
Loop
Me!ID = Left(Risk, Len(Risk) - 2)
End Sub
can someone give me an idea? thx