Office中国论坛/Access中国论坛

标题: 請教2個報表問題﹗ [打印本页]

作者: be    时间: 2005-3-11 01:44
标题: 請教2個報表問題﹗
請教各位前輩兩個問題﹕

1)在報表中﹐如果每頁打印20條記錄(每條記錄為1行﹐帶邊框)﹐然后換頁﹐請問如何實現換頁﹖

2)如果最后一頁不滿20行記錄﹐則用有邊框的空行補足20行﹐請問如何實現補滿20行﹖[em06]
作者: ququ    时间: 2005-3-11 04:03
在報表的“列印頁前”事件中輸入下面內容。Private Sub Report_Page()

Dim rpt As Report, lngColor As Long

Dim I As Integer

Set rpt = Reports!當前報表

rpt.ScaleMode =20

lngColor = RGB(255, 0, 0)

rpt.Line (2.503, 2.5)-(4.735, 6.588), lngColor, B

rpt.Line (7.354, 2.5)-(9.074, 6.588), lngColor, B

rpt.Line (10.317, 2.5)-(12.037, 6.588), lngColor, B

rpt.Line (13.81, 2.5)-(15.952, 6.588), lngColor, B

rpt.Line (19.123, 2.5)-(19.123, 6.588), lngColor

For I = 1 To 20

    rpt.Line (0.4, 2.5 + (I - 1) * 0.584)-(19.123, 2.5 + I * 0.584), lngColor, B

Next I

End Sub
作者: ququ    时间: 2005-3-11 04:13
http://www.access911.net/index.asp?board=8&recordid=72FAB21E
作者: be    时间: 2005-3-15 01:59
哦﹐搞明白了﹐謝謝ququ![em02]




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3