Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FormatCount gives different answers on print and preview

Status
Not open for further replies.

sencar

Technical User
Jun 3, 2001
2
GB
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top