Public FormPoint(1 To 10) As Form ''FORM的堆记录
Public FormP As Integer ''堆指针
'''XOPen基本的功能
Public Sub OPenWin(ParentForm As Form, s As String)
If IsNull(ParentForm) = False Then
FormP = FormP + 1
Set FormPoint(FormP) = ParentForm
ParentForm.Visible = False
End If
DoCmd.OpenForm s, , , , , acDialog
End Sub
Public Sub CloseWin()
DoCmd.Close
End Sub
Public Sub PrintReport(ParentForm As Form, RptName As String, Optional 预览打印 As Boolean = True)
FormP = FormP + 1
Set FormPoint(FormP) = ParentForm
ParentForm.Visible = False
DoCmd.OpenReport RptName, IIf(预览打印, acViewPreview, acViewDesign)
If 预览打印 Then DoCmd.Maximize
End Sub
Public Sub ShowWin()
FormPoint(FormP).Visible = True
FormP = FormP - 1
End Sub