Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Color based on Field Contents

Status
Not open for further replies.

davidol

Programmer
Mar 26, 2002
4
0
0
US
I would like be able to have a box or retrieve an image for instance, that is Green when the Status Field = "1" and Red when the Status Field is "0" on a form.

Any suggestions?

Thanks
 
Here is an example of some code from the detail section of a report on format property

If (two > Daily_Goal_MER) Then
[two].ForeColor = 255
Else
[two].ForeColor = 16711680
End If


Mine is a calculation based result. [Two] and [Daily_Goal_Mer] are both field names from my table.

Your solution should be quite similar.
 
Here is an example of some code from the detail section of a report on format property

If (two > Daily_Goal_MER) Then
[two].ForeColor = 255
Else
[two].ForeColor = 16711680
End If


Mine is a calculation based result. [Two] and [Daily_Goal_Mer] are both field names from my table.

Your solution should be quite similar. 255 is red and 16711680 is blue.
 
Cool for reports! Any ideas on something similar on a form, without the user needing to "click" anything, but just based on a field content?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top