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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SHADING HELP PLEASE!! 1

Status
Not open for further replies.

matty1404

MIS
Feb 12, 2007
74
US
How do I get shading to stop at my last text box in a report. The report detail is separated into two columns. The gray keeps going past where the info ends in each section. Is there some code that will force the gray to stop at my last box in that section??
 
Are you suggesting your report layout features two columns? What causes your shading? Is this the back color of controls or sections or what?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Private Sub Detail_Format(Cancel As Integer, PrintCount As Integer)
If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = 14079702
Else
Me.Section(0).BackColor = vbWhite
End If
End Sub

This is my code i used. Yes my report detail is using two columns that run up to down each on half the page. I want to shade every other record. as it runs. My biggest question is, can you shrink the size of the columns. basically it has a description, item #, and a price running horizontally in the column. The gray runs about an inch beyond where my text boxes actually end so it looks stupid. I need to be able to stop the gray from going beyond my boxes.
 
The entire detail section is getting the colored background. You could possibly place a rectangle behind your controls and change its color or possible add a white rectangle to the right of your other controls.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
A problem I am running into is that my sections are different size. Your idea almost worked with the white rectangle, but one section seems a little bit smaller so when I get one to work the other one is not right or getting cut off the page. I need to shrink the column size of on of the sections. How do you do that??
 
I got it figured out. I put a rectangle in and I had to play with the border sizes, but it did finally work. Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top