Function gString()
Dim ctl As Control
For Each ctl In Me.Controls
If TypeOf ctl Is ComboBox Then
If Not IsNull(ctl) Then
gString = gString & ctl.Name & "='" & ctl & "' And "
End If
End If
Next
If Len(gString) <> 0 Then
gString = Left(gString, Len(gString) - 3)
Me.[合同维护_子窗体].Form.Filter = gString
Me.[合同维护_子窗体].Form.FilterOn = True
End If
End Function