A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Highlight report line



 
 
Thread Tools Display Modes
  #1  
Old December 21st, 2009, 11:02 AM posted to microsoft.public.access.reports
PeteN via AccessMonster.com
external usenet poster
 
Posts: 5
Default Highlight report line

I need to highlight/shade any lines in a printed report where date 1 = date2,
how do I accomplish this?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200912/1

  #2  
Old December 21st, 2009, 12:28 PM posted to microsoft.public.access.reports
Rob Parker[_3_]
external usenet poster
 
Posts: 173
Default Highlight report line

Conditional Formatting is your friend here. Check the Help for details if
it's not blindingly obvious. You'll need a criteria of {date1] = [date2] in
there somewhere; and you'll need to apply it to all the controls in the
report section.

HTH,

Rob

PeteN via AccessMonster.com wrote:
I need to highlight/shade any lines in a printed report where date 1
= date2, how do I accomplish this?



  #3  
Old December 21st, 2009, 02:01 PM posted to microsoft.public.access.reports
John Spencer
external usenet poster
 
Posts: 7,815
Default Highlight report line

Select all the controls in the detail line and set their Back Style to
TRANSPARENT. You can select all the textbox and label controls at one time
and set the Back style property of all them at the same time.

Add VBA code to the detail section's format eventto change the back color of
the section depending on the values of the two controls (or fields)

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.ControlA Me.ControlB then
Me.Section(acDetail).BackColor = vbWhite
else
Me.Section(acDetail).BackColor = 13882323 'Light Grey
End If
End Sub


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

PeteN via AccessMonster.com wrote:
I need to highlight/shade any lines in a printed report where date 1 = date2,
how do I accomplish this?

  #4  
Old December 21st, 2009, 03:05 PM posted to microsoft.public.access.reports
PeteN via AccessMonster.com
external usenet poster
 
Posts: 5
Default Highlight report line

Thanks to both John & Rob, this solved my problem.

John Spencer wrote:
Select all the controls in the detail line and set their Back Style to
TRANSPARENT. You can select all the textbox and label controls at one time
and set the Back style property of all them at the same time.

Add VBA code to the detail section's format eventto change the back color of
the section depending on the values of the two controls (or fields)

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.ControlA Me.ControlB then
Me.Section(acDetail).BackColor = vbWhite
else
Me.Section(acDetail).BackColor = 13882323 'Light Grey
End If
End Sub

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

I need to highlight/shade any lines in a printed report where date 1 = date2,
how do I accomplish this?


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200912/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.