VSView Reporting Edition Reference > Field Object > Field Properties > ForeColor Property |
Returns or sets the Field's foreground color.
field.ForeColor[ = colorref& ]
Use the ForeColor property to specify the color for text in a field. You can use this property to make fields easy to read or to convey a special meaning. For example, you can change the color of the text in the UnitsInStock field when its value falls below the reorder level. For example:
Dim strOnPrint$
strOnPrint = "If UnitsInStock < ReorderLevel Then " & _
" UnitsInStock.ForeColor = vbRed " & _
"Else" & _
" UnitsInStock.ForeColor = vbBlack"
vsr.Sections(vsrDetail).OnPrint = strOnPrint
Color