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

Reports CAN GROW function

Status
Not open for further replies.

Datathumper

Technical User
Jan 26, 2004
46
0
0
CA
Can anyone help with this one.

I have a report where the fields are set to "can grow". I want to have the "excel" look (ie. each field has a visible border) when it reports. I would like to have all fields grow equally to the size of the larges one. Is that possible? Otherwize it produces an uneven look when one field is larger than the rest.

Thanks.
 
This may suit, first get rid of the borders on your controls, then add this code to the report module, which should draw boxes:
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    Dim lngHeight As Long 'store the height of tallest control
    Dim CTL As Access.Control
    
    For Each CTL In Me.Detail.Controls
        If CTL.Height > lngHeight Then
            lngHeight = CTL.Height
        End If
    Next

    For Each CTL In Me.Detail.Controls
        Me.Line (CTL.Left, 0)-(CTL.Left + CTL.Width, lngHeight), RGB(0, 0, 0), B
    Next
    Set CTL = Nothing
End Sub
 
PS There is
Microsoft: Access Reports Forum
forum703
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top