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
 

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