Private Sub 主体_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
If CtlDetail.name <> "Memo" Then
Me.Line ((.Left + .Width + intLineMargin), 1)-(.Left + .Width + _
intLineMargin, Me.Height)
End If
End With
Next
With Me
Me.Line (1, 1)-Step(.Width, .Height), 1, B
End With
Set CtlDetail = Nothing
End Sub 作者: 方漠 时间: 2006-9-21 22:11
可能是因为ACCESS把分页符也视作一个控件。作者: andymark 时间: 2006-9-21 22:31
判断类型再执行
If CtlDetail.ControlType <> acPageBreak Then
If CtlDetail.Name <> "Memo" Then
Me.Line ((.Left + .Width + intLineMargin), 1)-(.Left + .Width + _
intLineMargin, Me.Height)
End If
End If作者: qlm 时间: 2006-9-22 02:29
谢谢两位!