我正在使用Access和VBA创建动态报告,我想添加一个新页面。 到目前为止使用的代码如下所示:
Dim rpt As Report ' hold report object
Set rpt = CreateReport
With rpt
.Visible = True
.caption = "Calendar View"
.BorderStyle = 1
.AutoCenter = True
.ScrollBars = 0
.Printer.Orientation = acPRORLandscape
.Modal = True
.PopUp = True
.AutoResize = True
.FitToPage = True
End With
do until condition
/* add controls and other stuff */
rpt.Section(acDetail).ForceNewPage = 2
loop
DoCmd.Close acReport, strName, acSaveYes
如何在循环结束时添加新页面? 谢谢!