conditional formatting based on count

L

Larry B

I have a report that provides the detail of medical payments billed. I have a
count field on the report to tell me the number of payments sent and another
field to show how many can still be billed out of the predetermined number of
24 (the max number of payments we can bill)
Each payment is on seperate row in the group on the report.
I would like to highlight the rows that exceed the 24 max payment limit. For
example, if the patient only has 20 payments billed, then nothing happens,
but on the 25th payment, I need it highlighted. How can I do this?
 
M

Marshall Barton

Larry B said:
I have a report that provides the detail of medical payments billed. I have a
count field on the report to tell me the number of payments sent and another
field to show how many can still be billed out of the predetermined number of
24 (the max number of payments we can bill)
Each payment is on seperate row in the group on the report.
I would like to highlight the rows that exceed the 24 max payment limit. For
example, if the patient only has 20 payments billed, then nothing happens,
but on the 25th payment, I need it highlighted. How can I do this?


Add a (hidden?) text box (named txtPayNum) to the detail
section. Set its control source to =1 and RunningSum
property to Over Group.

Then add some code to the detail section's Format event:

If Me.txtPayNum > 24 Then
Me.payment..BackColor = vbYellow
Else
Me.payment..BackColor = vbWhite
End If
 

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

Top