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  

column width changes report header width



 
 
Thread Tools Display Modes
  #1  
Old August 21st, 2009, 05:48 PM posted to microsoft.public.access.reports
jmoore[_2_]
external usenet poster
 
Posts: 81
Default column width changes report header width

I am posting this a second time hoping this subject explains my problem
better and someone can help.

I would like to have the detail section display only 2 inches wide with an
alternating back color. I tried to do this by setting the page layout as a
single column. This displays the data correctly, but the report
header/footer are
cut off. If I leave the page set up without a column, the alternating back
color spans the entire width of the report, about 7.5 inches. Is there a
way to have
alternating back color only behind the text boxes? Or, a way to identify a
single column width that will not change the report header width. Thank you!


  #2  
Old August 21st, 2009, 08:32 PM posted to microsoft.public.access.reports
Clifford Bass[_2_]
external usenet poster
 
Posts: 1,295
Default column width changes report header width

Hi,

Set the Detail section's Alternate Back Color to No Color. Add a text
box to your detail section that is two inches wide and takes up the entire
height of the detail section. Set the Back Style to Normal and the Border
Style to Transparent. Set the Border Width Hairline. Give it a name (i.e.
txtBackground), set its Control Source to =1 and set Running Sum to Over All
or Over Group, depending on your needs. Send the text box to the back,
behind all other controls in the detail section. Create an On Format event
for the detail section and place code in it that will change the color as
desired depending on the value of the control.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If txtBackground.Value Mod 2 = 0 Then
' Even row
txtBackground.BackColor = RGB(255, 128, 0)
Else
' Odd row
txtBackground.BackColor = RGB(0, 128, 255)
End If

End Sub

Hope that helps,

Clifford Bass

"jmoore" wrote:

I am posting this a second time hoping this subject explains my problem
better and someone can help.

I would like to have the detail section display only 2 inches wide with an
alternating back color. I tried to do this by setting the page layout as a
single column. This displays the data correctly, but the report
header/footer are
cut off. If I leave the page set up without a column, the alternating back
color spans the entire width of the report, about 7.5 inches. Is there a
way to have
alternating back color only behind the text boxes? Or, a way to identify a
single column width that will not change the report header width. Thank you!


 




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 10:05 PM.


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