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

Adjust vertical Line size in Group Header 2

Status
Not open for further replies.

sxschech

Technical User
Jul 11, 2002
1,033
US
Have a report with Several Group Headers and Footers. I have drawn vertical lines so that on the report they appear as solid lines going down the page. Today was asked to display an additional description in one of the headers only for one item. Thus, I set the text field up with an iif statement and set the height to 0.0146" so that I could see that something is there and then set the property to can grow/can shrink to yes. I placed the text box immediately below (touching) the existing text box. I stretched the lines within this group header section to be the height of the section. When I view the report, it leaves a white space below where the new text is displayed. I tried adding code to programmatically stretch the lines. While this did stretch the lines, it did not cover the white space and instead just pushed down the start of the next section (Detail Section). It didn't seem to matter whether the text that I wanted to display was visible (textbox grow) or not (textbox shrink).


Here is the code I tried for the line strech.
Code:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    If Me.col = "BN" Then
        Me.Line226.Height = "0.25" * 1244
    Else
        Me.Line226.Height = "0.15" * 1244
    End If
End Sub


Sample Display:
[tt]
AN | | |
N | 5 | 5 |
P | 5 | 7 |
Tot | 10 | 12 |
AM | | |
G | 2 | 1 |
Tot | 2 | 1 |
[/tt]

How it looks with conditionally added textbox and code to stretch lines:
[tt]
AN | | |
NN | | |
| | |

N | 5 | 5 |
P | 5 | 7 |
Tot | 10 | 12 |
AM | | |
G | 2 | 1 |
Tot | 2 | 1 |
[/tt]
 
I would use the Line method of the report to draw the lines.
Code:
Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
    Me.Line (Me.Line226.Left,0)-step(0,10000)
    Me.Line226.Visible = False
End Sub

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top