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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Font Color of a Record 1

Status
Not open for further replies.

jbento

Technical User
Jul 20, 2001
573
US
Help Please:)

Example: I have a report that's connected to a table, of course. The table has 4 fields, named field 1, field 2, field 3, & field 4. field 1 is a value list with these values: ".", "big", "little", & "small". I want the record text entry on the report to show the record as a red font if "." is in field 1. How do I do that? Please help...anybody:):):)
 
I am not sure what you mean about the record text entry as you didn't mention the specifics of it in the question. But, I will describe changing the font color of a control in the detail section of your report.

In the Detail Section properties select Event Procedure for the OnFormat property and click the three periods(...). Enter the following VBA code in the subroutine.

If Me![Field 1] = "." then
me![TextControlName].ForeColor = 255
else
me![TextControlName].Forecolor = 0
end if

This will change the color of the control me![textControlName] to red(255) when the value of field 1 is "." and back to black(0) when the control equals another value.

I hope this is what you were looking for.

Bob Scriver
 
Yes, that is exactly what I am looking for. I will try this on Monday when I get to work. Thanks so much.
 
Bob,
This worked like a CHARM!!!!!!:):):) Thank you so very much. Now I am going to apply it to some other things:).

HAVE A BLESSED DAY!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top