By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,486 Members | 1,784 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,486 IT Pros & Developers. It's quick & easy.

Conditional Formatting of a label on a report

P: 56
I have a Label on a report with a check box from a table indicating True or False. I would like to have the labels that are true to highlight yellow using conditional foramtting. The False labels to remain unhighlighted. I have tried changing the label to a text box and then conditional formatting "Expresion Is" "BILL"=TRUE. But the formatting is not working. I loose my Label text and BackColor does not change. Any Suggestions?
May 5 '09 #1
Share this Question
Share on Google+
5 Replies


Expert 100+
P: 1,287
Try changing "BILL" to [BILL].
May 5 '09 #2

P: 56
That worked to get my background highlighted. But because I have to change the label to a txtbox, in order to conditianally format it, the label text is gone. How can I gat the label text to come back?
May 5 '09 #3

Expert 100+
P: 1,287
You can set the control source of the text box (in properties or by typing into the box) to
Expand|Select|Wrap|Line Numbers
  1. = "Label Text"
You do need to type in the equals sign.
May 5 '09 #4

P: 56
Great....That did it. Thanks for all your help.
May 5 '09 #5

ADezii
Expert 5K+
P: 8,679
@Desitech
In the Detail Event of the Report, try something similar to:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
  2. If Me![<Check Box Name>] Then
  3.   Me![<Label Name>].ForeColor = vbYellow
  4. Else
  5.   Me![<Label Name>].ForeColor = vbBlack
  6. End If
  7. End Sub
May 5 '09 #6

Post your reply

Sign in to post your reply or Sign up for a free account.