rivate Sub Report_Open(Cancel As Integer)
aaa = InputBox("请输入固定的行数[试用建议1-6]", "请输入行数", 3)
End Sub
'下面代码实现分页
rivate Sub 主体_Format(Cancel As Integer, FormatCount As Integer)
If Me.counter Mod aaa = 0 Then '每隔aaa行分页
Me.PageBreak9.Visible = True
Else
Me.PageBreak9.Visible = False
End If
End Sub
'下面代码自动给表格加边框并换行
;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.ControlType <> acPageBreak Then
If CtlDetail.Name <> "Memo" Then
Me.Line ((.Left + .Width + intLineMargin), 1)-(.Left + .Width + _
intLineMargin, Me.Height)
End If
End If
End With
Next
With Me
Me.Line (1, 1)-Step(.Width, .Height), 1, B
End With
Private Sub Report_Open(Cancel As Integer)
aaa = InputBox("请输入固定的行数[试用建议1-6]", "请输入行数", 3)
End Sub
Private Sub 主体_Format(Cancel As Integer, FormatCount As Integer)
If Me.counter Mod aaa = 0 Then '每隔aaa行分页
Me.PageBreak9.Visible = True
Else
Me.PageBreak9.Visible = False
End If
End Sub
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.ControlType <> acPageBreak Then
If CtlDetail.Name <> "Memo" Then
Me.Line ((.Left + .Width + intLineMargin), 1)-(.Left + .Width + _
intLineMargin, Me.Height)
End If
End If
End With
Next
With Me
Me.Line (1, 1)-Step(.Width, .Height), 1, B
End With
Set CtlDetail = Nothing
End Sub 作者: appleboy0028 时间: 2006-11-30 19:12
谢谢