grid lines in group header

N

Nancy

I am trying to add grid lines to a group heade 0 in a report.
I can get the grid in the detail section, but how do I get the same in a
group header0
Here is my code for detail section

Detail:
For Each CtlDetail In Me.Section(acDetail).Controls
With CtlDetail
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)

End With
Next

Thanks,

nancye
 
M

Marshall Barton

Nancy said:
I am trying to add grid lines to a group heade 0 in a report.
I can get the grid in the detail section, but how do I get the same in a
group header0
Here is my code for detail section

Detail:
For Each CtlDetail In Me.Section(acDetail).Controls
With CtlDetail
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)

End With
Next


Be sure to put the code in the section's Print event (the
CanGrow height is not known in the Format event):

Me.Line(0,0)-(0,Me.Height)
For Each Ctl In Me.Section(acGroupHeader0).Controls
With CtlDetail
Me.Line (.Left+.Width+intLineMargin,0)-Step(0,Me.Height)
End With
Next
 
D

Duane Hookom

I would add code to the On Format or Print event of the Group Header 0
For Each CtlDetail In Me.Section(5).Controls
With CtlDetail
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
End With
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top