Hi Crystal,
Thanks for your prompt reply, I have used the method you suggest, on this
ccasion however the data is not numeric, but text
I am using the following code on the Continuous form's On Current Event :-
Both Fields being Text
This will change the colour of Field2 as I want, but again the whole column
will also change colour.
If Me.Field1 = "A" Then
Field2.ForeColor = 13209
End If
I have also tried placing a third Field with ForeColor set to red and
Visible = False which I placed on top of Field2 and used the following :-: -
If Me.Field1 = "A" Then
Field3.Visible = True
End If
This resulted with the same problem
Anyway, many thanks again and you too have an awesome day
Joe
:
Hi Joe,
Access 97 does not have Conditional Formatting
is your form continuous or single form view? If continuous, there is
nothing I am aware of as all records will change...
the only thing I know of to change colors of control in Access97 is
using the different parts of the Format property, but those are limited
to evaluating the control itself for positive, negative, null, or zero...
on format code for numbers -- there are 4 parts
1. format for positive numbers
2. format for negative numbers
3. format for 0 (zero)
4. format for null
ie:
Format --> #,##0;[red]-#,##0;0;0
numbers will have no decimal places
negative numbers will be Red
zeros and null values will show up as a 0
Format --> #,###.##;[red]-#,###.##;"";""
numbers will show up to 2 decimal places
negative numbers will be Red
zeros and null values will not be displayed
for more help on Format, press the F1 key in the Format property on the
property sheet
Warm Regards,
Crystal
*
have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
Joe Coulter wrote:
Hi strive4peace
I have found your answer to this problem interesting, I too have been trying
to change the colour of one field based on a value in another field within
the same record and found that all the records in the form applied the
change, I am using Access 97, how can I use you fix to help me with this, I
have looked for conditional format on the target field but cannot find where
to apply your fix.
I would be grateful for your help if you can do.
Thank you in advance
Joe
:
Conditional Formatting
---
Hi Rohan,
use Conditional Formatting
choose the control that you want to change color
from the menu: Format, Conditional Formatting...
Expression Is --> [OtherFieldname] = 0 --> set format to Blue
Warm Regards,
Crystal
*
have an awesome day
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
Rohan via AccessMonster.com wrote:
I have a window with a continuous form in it, to create a ledger.
I want to make one of the fields blue, if another field is 0, but only on
that line in the ledger.
I tried using field.forecolor on an if statement in the onCurrent event, but
that colours in the whole
column when you go to that line.
Any clues ?
Rohan.