Change row font color

  • Thread starter Thread starter Hugh
  • Start date Start date
H

Hugh

I am using Access 2000 and would like to change the font color of the first
three rows of a report to green. I am a novice when it comes to code writing
and would greatly appreciate help with this project. The rows consist of
Player names and their stats.

Hugh
 
Hugh said:
I am using Access 2000 and would like to change the font color of the
first three rows of a report to green. I am a novice when it comes to
code writing and would greatly appreciate help with this project. The
rows consist of Player names and their stats.

Hugh

Put a new TextBox in that section with a ControlSource of =1, a Visible property
of No, and a RunningSum property of "Over All" or "Over Group" as appropriate to
your situation. Then in the OnFormat code event for the report section...

If TextBoxName < 4 Then
Me.ControlName1.ForeColor = vbGreen
Me.ControlName2.ForeColor = vbGreen
etc..
Else
Me.ControlName1.ForeColor = vbBlack
Me.ControlName2.ForeColor = vbBlack
etc..
End If
 
Thank you Rick, that works great. Is the extra TextBox there just for a
counter? I'm trying to understand how this code business works.

Hugh
 
Rick,

I have one more problem that you may be able to solve for me. In the Header
of my report I have control to designate the particular course (Red, Green,
Orange) that we are playing for a given week. I have a table with just those
three entries called "Courses". I also have a table called "Schedule" that
has all the play dates and the "Course" that we play each week. I use a
query to extract the particular course for a given which passes the info on
to a subreport that places the course for that week in my report. I would
like the course name to be formatted the color of it's name, i.e., Green
course green font, Orange course orange font, etc. I tried using a similar
code like the one you gave me but to no avail:
If Courses=Green Then
Me.Courses.ForeColor=32768
Can you help?

Hugh
 
Hugh said:
Rick,

I have one more problem that you may be able to solve for me. In the
Header of my report I have control to designate the particular course
(Red, Green, Orange) that we are playing for a given week. I have a
table with just those three entries called "Courses". I also have a
table called "Schedule" that has all the play dates and the "Course"
that we play each week. I use a query to extract the particular
course for a given which passes the info on to a subreport that
places the course for that week in my report. I would like the course
name to be formatted the color of it's name, i.e., Green course green
font, Orange course orange font, etc. I tried using a similar code
like the one you gave me but to no avail:
If Courses=Green Then
Me.Courses.ForeColor=32768
Can you help?

You need quotes around string values.

If Me!Courses = "Green" Then ...
 
Back
Top