Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a field go grey in a report

Status
Not open for further replies.

Lilagt

Technical User
Apr 27, 2000
7
US
Ok, I know I'm lame, but haow do I format a field to show up grey on a report if another field is &quot;True&quot;<br><br>In my report, I have a date field, that I want to turn grey when the actual box is checked.&nbsp;&nbsp;Am I being clear?/<br><br>Please help!
 
Are you talking about a report or a form?<br><br>If a form, check out the backcolor property in Help.&nbsp;&nbsp;It gives a good example.<br><br>Sorry to be brief! <p>jgarnick<br><a href=mailto:jgarnick@aol.com>jgarnick@aol.com</a><br><a href= > </a><br>
 
In a report.&nbsp;&nbsp;I need the first field to turn grey if the second field &quot;actual&quot; is checked (or = yes)
 
click the field you want greyed, select conditional formating on the format menu and then expression is type [actual]= yes
 
Are you wanting to gray the whole column or each record on a report that happens to is &quot;True&quot;?<br><br>So some will be gray and some won't?<br><br>If you want it to show gray when one value is true and the next is false then VBA Code is your answer.<br><br>Your Textbox can have ist Control source be at a function <br>called GrayMe()<br>Public Function GrayMe(Value)<br>&nbsp;&nbsp;&nbsp;&nbsp;' light gray number = 12632256<br>&nbsp;&nbsp;&nbsp;&nbsp;' DARK gray number = 8421504<br>&nbsp;&nbsp;&nbsp;&nbsp;' white number = 16777215<br>&nbsp;&nbsp;&nbsp;&nbsp;If Value = True Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reports![Report1]![text25].BackColor = 12632256<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GrayMe = &quot;True&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reports![Report1]![text25].BackColor = 16777215<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GrayMe = &quot;False&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;End If<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>End Function<br><br>I ran this function but it does not change the .BackColor to gray. It does however put the word True or False in each box. So the Function is &quot;Functioning&quot; <br><br>So I don't think you can change the .BackColor property in run mode only in design mode.<br><br><br> <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
I would love to do that, but my control source is already being used.<br><br>What I mean is:<br><br>I have a field in my report called &quot;received&quot; which hold projected dates in it, then the next field is &quot;actual&quot;, which is to be checked when the item is actually received, and no longer a projection. SO, I need the report to grey the &quot;received&quot; field whenever the &quot;actual&quot; field is checked. The date in the &quot;received&quot; field must always show up.<br><br>Have I completely confused everyone??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top