如果只是对下面的子窗体进行筛选的话
1. 随便做个查询,名称为 Q
2.
Private Sub Combo2_AfterUpdate()
Dim Qdf As DAO.QueryDef
Dim strCriteria As String
Dim str As String
If Not IsNull(Me.Combo2) Then
str = Me.Combo2
strCriteria = "InStr([Identification Code],'" & str & "') > 0"
Set Qdf = CurrentDb.QueryDefs("Q")
Qdf.SQL = "SELECT manufactory.* FROM manufactory where " & strCriteria
Me.Child4.SourceObject = "查询.Q"
Qdf.Close
Set Qdf = Nothing
End If
End Sub
这样也可以
Private Sub Combo2_AfterUpdate()
Dim strCriteria As String
Dim str As String
If Not IsNull(Me.Combo2) Then
str = Me.Combo2
strCriteria = "InStr([Identification Code],'" & str & "') > 0"
Me.Child4.Form.Filter = strCriteria
Me.Child4.Form.FilterOn = True
End If
End Sub