Conditionally chg font color of field in rpt based upon val of fie

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

Guest

I am using Access 97. I have created a video database and the field "Type"
contains the identification showing if the video is "DVD" or "VHS"

My objective is to change the color of the font (forecolor) when the value
in the record is "DVD".

Does anyone have any suggestions, I am not able to locate anything in the
Access help documentation that shows how to use the values of the properties
for the field to conditionally change the color when the value = "DVD"

I am converstant in Visual Basic and Macros.

Thanks for any assistance.
 
I would add a field to your "Type" lookup table that stores the color of
each type. Include this table and field in your report's record source. Bind
the [TypeColor] field to a hidden text box in the same section as your Type
text box. Add code to the On Format event of the section like:

Me.txtType.ForeColor = Nz(Me.txtTypeColor,0)
 
Back
Top