If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Access 97-change colour of a number in a report depending on value?
Hi,
I'm using access 97 and have a basic report lising a series of results for a number of sites. I'm wanting to change the appearence of a number depending on what it is...say if it's than 2000, the result is shown in red and if below 100 in green. I understand conditional formating is only available in access 2K but wanted to know if there's a way? Even having a text box behind the number and changing the colour of that would help!! |
#2
|
|||
|
|||
Access 97-change colour of a number in a report depending on value?
Peter:
Actually this is pretty easy to do. In the On Print event of the section of the report that contains the control with the value you want to evaluate and change the colour of, add code like this: Const RED = 255 Const GREEN = 65280 If Me!NameOfYourControl.Value 2000 Then Me!NameOfYourControl.ForeColor = RED Else Me!NameOfYourControl.ForeColor = GREEN End If HTH -- Steve Arbaugh ACG Soft http://ourworld.compuserve.com/homepages/attac-cg "Peter" wrote in message ... Hi, I'm using access 97 and have a basic report lising a series of results for a number of sites. I'm wanting to change the appearence of a number depending on what it is...say if it's than 2000, the result is shown in red and if below 100 in green. I understand conditional formating is only available in access 2K but wanted to know if there's a way? Even having a text box behind the number and changing the colour of that would help!! |
Thread Tools | |
Display Modes | |
|
|