I use this code to count whether the value of a calculated control is 5 - 10, 11 - 25 or 26+. The values are transferred to unbound textboxes in the report footer. The correct values for my sample data are 5, 1 and 8. On previewing the report these values are displayed but on printing the numbers change to 4, 1 and 8. I have read elsewhere that this sort of problem is a recognised feature of Access but have never seen a solution. Can the group help?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If FormatCount = 1 Then
Select Case grou
Case Is > 25
Hours25plus = Hours25plus + 1
Case Is > 10
Hours10plus = Hours10plus + 1
Case Is > 5
Hours5plus = Hours5plus + 1
Case Else
End Select
End If
End Sub
Thanks
Sencar
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If FormatCount = 1 Then
Select Case grou
Case Is > 25
Hours25plus = Hours25plus + 1
Case Is > 10
Hours10plus = Hours10plus + 1
Case Is > 5
Hours5plus = Hours5plus + 1
Case Else
End Select
End If
End Sub
Thanks
Sencar