lines between columns?

amoona

Registered User.
Local time
Tomorrow, 00:21
Joined
Jan 18, 2005
Messages
20
hi,

i was just wondering if there is a way to seperate columns in a tabular layout report by lines?? ( i want it to look like a table)


i tried putting lines from the toolbox but i get a spaces between the rows..


thankxxx
 
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
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

End Sub
 
thanxxxx alot

it works perfectly :D


now i want to do the same thing for the headings of the table columns which is in the report header , but the problem is there are some labels which i don't want to include..

is it possible???
 
Formatting either the Background or Row's Font Color

Trick here is that each control has to have
its BackStyle Property set to Transparent

The Sig control in this example is either “H” or null

In Detail Section of REPORT
On Format Event

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

Dim CtlDetail As Control
Const clrYellow = "14024703"
Const clrBlue = "8404992"

‘Alter Property of each control based upon If statement
For Each CtlDetail In Me.Detail.Controls
    If Me.Sig = "H" Then
        With CtlDetail
            .ForeColor = clrBlue
        End With
    Else
        With CtlDetail
            .ForeColor = vbBlack
        End With
    End If
Next

Set CtlDetail = Nothing
    
‘Alter detail background color for each line based upon IF statement
    If Me.Sig = "H" Then
        Me.Detail.BackColor = clrYellow
    Else
        Me.Detail.BackColor = vbWhite
    End If
End Sub
 

Users who are viewing this thread

Back
Top Bottom