color with report

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

Guest

Hi
I have a report with a field called Art, there are about 30 records when i print this report
i'd like to print the records where Art is like car in red and the records where Art is like truck in green
Is it possible?
 
i forgot to tell you that i can't use a conditional formatting function because i have more than 3 Art to change the color
 
I would create a table tblVehicleColors with two fields [Vehicle] (text to
store Car or Truck,...) and [TheColor] (long integer or store color value).
Join this table to your report's record source and add the [TheColor] field
to the grid. You can then use code in the On Format event of the section
containing your controls (you must bind TheColor to a text box)
Me.Art.ForeColor = Me.TheColor
When you want to change colors or add more vehicles, you do this in the
table rather than in code.

--
Duane Hookom
MS Access MVP


ingbank said:
Hi
I have a report with a field called Art, there are about 30 records when i print this report.
i'd like to print the records where Art is like car in red and the records
where Art is like truck in green.
 
i've done it but when i open the report there is a error messag
Run-time error 1
Type mismatch
 
I'm having trouble seeing your:
Code
Table values and field names
when the error appears
what your report record source looks like
 
Back
Top