这是在网上下载的报表中自动换行的代码,但当我用在别的报表上是则不可以,希望能够有人分析其中的原因,源文件中“报表一”是我自己制作的,INCREASEMENT是作者制作的。
其中的代码如下:
Option Compare Database
Option Explicit
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
If CtlDetail.name <> "Memo" Then
Me.Line ((.Left + .Width + intLineMargin), 0)-(.Left + .Width + _
intLineMargin, Me.Height)
End If
End With
Next
With Me
Me.Line (0, 0)-Step(.Width, .Height), 0, B
End With
Set CtlDetail = Nothing
End Sub
[此贴子已经被作者于2005-7-27 16:07:18编辑过]
|