I have a report with several records. Of these records, I want to change the color of a line(record), based on the criteria of a field within that record. Meaning, if "Field A" = "yes" then set the color of the line(record) to red, otherwise leave the line black.
Here's my code:
The problem with this code is that it colors ALL records with red if the report finds any of the fieldA records equal "yes". I only want the same record, with the same value of fieldA that equals "yes" to be colored, not all of the records thereafter. I've created this code within the "OnPrint" section of the report.
Can anyone help?
Here's my code:
Code:
if me.fieldA.value = "yes" then
me.qtenbr.ForeColor = vbRed
me.SONbr.ForeColor = vbRed
end if
The problem with this code is that it colors ALL records with red if the report finds any of the fieldA records equal "yes". I only want the same record, with the same value of fieldA that equals "yes" to be colored, not all of the records thereafter. I've created this code within the "OnPrint" section of the report.
Can anyone help?