Access Count Formulas

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to recycle a count field (based off of the record auto number field)
every 500 records. Please help.
 
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.
 
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.).
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top