Modify fields programmatically

  • Thread starter Thread starter Jennifer Beck
  • Start date Start date
J

Jennifer Beck

It is possible to color code certain fields in a report in
Visual FoxPro. Is it possible to do this in Access 97?
How?
 
Jennifer said:
It is possible to color code certain fields in a report in
Visual FoxPro. Is it possible to do this in Access 97?
How?

Well, that depends on what you mean by "color code".

You can just set a control's Fore, Bac or Border Color
properties to make it always appear in the specified color.

If you want a control to be in different colors depending on
its value, then you might be able to use Conditional
Formatting (Format menu). In general, the most versatile
approach is to use VBA code in the control's section Format
event procedure.
 
You can use code in the On Format event of section containing the controls.

If Me.txtGender = "F" Then
Me.txtFirstName = vbRed
Me.txtLastName = vbRed
Else
Me.txtFirstName = vbBlue
Me.txtLastName = vbBlue
End If
 
Back
Top