Formatting a field based on another field

P

PattiP

How would I write the code for the following:

If the data in FieldC meets a certain criteria, I would like FieldA
background color to be shaded. Better yet, I'd like to have the entire record
shaded rather than just FieldA, if possible?? I'd be happy with either
solution... THANKS!
 
F

fredg

How would I write the code for the following:

If the data in FieldC meets a certain criteria, I would like FieldA
background color to be shaded. Better yet, I'd like to have the entire record
shaded rather than just FieldA, if possible?? I'd be happy with either
solution... THANKS!

And the criteria is?????
Code the Detail Format event:

If Me![FieldC] = SomeCriteria then
Me.Section(0).BackColor = 12632256
Else
Me.Section(0).BackColor = 16777215
End If
 
P

PattiP

Thanks, Fredg! That worked great!

--
Patti


fredg said:
How would I write the code for the following:

If the data in FieldC meets a certain criteria, I would like FieldA
background color to be shaded. Better yet, I'd like to have the entire record
shaded rather than just FieldA, if possible?? I'd be happy with either
solution... THANKS!

And the criteria is?????
Code the Detail Format event:

If Me![FieldC] = SomeCriteria then
Me.Section(0).BackColor = 12632256
Else
Me.Section(0).BackColor = 16777215
End If
 
Top