Public Sub SetParentFormctrls(ByVal frm As Form)
'功能:将子窗体控件数据赋值给主窗体对应控件
Dim ctrls As Controls
Dim ctrl As Control
Set ctrls = frm.Parent.Controls
For Each ctrl In frm.Controls
If ctrl.ControlType <> acLabel Then
ctrls(ctrl.Name).Value = ctrl.Value
End If
Next
End Sub