Lines in reports

  • Thread starter AccessNoviceButTrying
  • Start date
A

AccessNoviceButTrying

Any help would be appreciated.

Is there any way of making a line go from the top of a section in a report
to the bottom of a section when I have some fields that have the Can Grow
setting.

Thanks
 
M

Marshall Barton

AccessNoviceButTrying said:
Is there any way of making a line go from the top of a section in a report
to the bottom of a section when I have some fields that have the Can Grow
setting.

You need to use VBA code in the section's Format or Print
event to do that:

Me.Line(X,0)-Step(0,30000)
where X is the horizontal position in twips (1440 twips per
inch) where you want the line. If you want the line to be
at the left edge of a text box, then X would be
Me.textbox.Left
 
D

Duane Hookom

You can use the Line method in code to draw the lines.

If you have existing vertical lines, you can set them to invisible and then
add this code in the On Print event of the detail section.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim ctl As Access.Control
For Each ctl In Me.Controls
If TypeOf ctl Is Line Then
Me.Line (ctl.Left, 0)-(ctl.Left, 10000), 0
End If
Next ctl
End Sub
 

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