Private Sub 查询_Click()
Dim strCriteria As String
For Each ctl In Me.Controls
If TypeOf ctl Is TextBox Then
If Not IsNull(ctl) Then
strCriteria = strCriteria & ctl.Name & " like '*" & ctl & "*' AND "
End If
End If
Next
If strCriteria <> "" Then
strCriteria = Left(strCriteria, Len(strCriteria) - 5)
End If
Me.档案子窗体.Form.Filter = strCriteria
Me.档案子窗体.Form.FilterOn = True
End Sub