Dim frm As Form, ctlDefault As Control
' 创建新窗体。
Set frm = CreateForm
' 返回代表默认命令按钮的控件对象。
Dim subfrm As SubForm
Set subfrm = frm.DefaultControl(acSubform)
Set subfrm = CreateControl(frm.Name, acSubform, , , , 500, 500)
subfrm.SourceObject = Forms!窗体8 '?????????????????????????????????
'subfrm.LinkChildFields = ""
' subfrm.LinkMasterFields = ""
DoCmd.Restore