Gridlines on a Report

  • Thread starter Thread starter Lee Mathews
  • Start date Start date
L

Lee Mathews

Guest
I am trying to figure out how to put gridlines on a report, anybody help ?
 
The only ways I could find were:

To set Border Style to Solid for the text boxes in the detail, then align them very carefully.

or

To make them yourself with lines, but it's very hard to make them look good this way.

Mike
 
Hi Lee and Mike

Sorry to be digging up an old posting like this ... but it was a posting last year that made me realise that others were struggling, in the same way that I was, with this area and so I set about trying to discover a solution. Only now have the results of that head-scratching come to light in the public domain.

It is possible programmatically to draw continuous vertical lines for the detail section of a report that will grow according to the height of all the text boxes.

The article "The Continuous Line Conundrum" in March 2001 Smart Access gives the solution.
http://www.smartaccessnewsletter.com/

I hope that this article may be of interest to some people on this Forum.

Rich Gorvin

[This message has been edited by Rich@ITTC (edited 04-03-2001).]
 
Set the all the text box border's to transparent, in the detail on print event add
Dim CtlDetail As Control
Dim intLineMargin As Integer


intLineMargin = 60


For Each CtlDetail In Me.Section(acDetail).Controls
With CtlDetail

Me.Line ((.left + .Width + intLineMargin), 0)-(.left + .Width + _
intLineMargin, Me.Height)

End With
Next
With Me
Me.Line (0, 0)-Step(.Width, .Height), 0, B
End With

Set CtlDetail = Nothing
HTH
 

Users who are viewing this thread

Back
Top Bottom