Access Count Formulas

N

NearlyHuman

I need to recycle a count field (based off of the record auto number field)
every 500 records. Please help.
 
N

NearlyHuman

I should probibly add the desired result. I am printing serilized labels at
a manufacturing facility and need to flag every 500th label to send to the
quality control department. My thought was to recycle the count on the form
and on the report (the label) use an IIF statment for visibility.
 
J

Jesse Aviles

If there is a numeric field that increases at a certain pattern (1 count, three count, etc.) you can
test for the pattern with the conditional formatting property of a report. Using the conditional
property you can make the label stand out (make it bold, red text, underlined, etc.).
 
P

Pieter Wijnen

Create a hidden Control (text1)
Control Source: =1
Running Sum: Over All

Add This (or similar code) to the Detail_Format Event:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
On Error Resume Next
If Me.Text1 Mod 500 = 0 Then
Me.Section(0).BackColor = RGB(&HC0, &HC0, &HC0)
Else
Me.Section(0).BackColor = RGB(255, 255, 255)
End If
End Sub

HTH

Pieter
 
Top