Modify fields programmatically

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?
 
M

Marshall Barton

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

Duane Hookom

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
 

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