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

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.
 
D

Duane Hookom

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top