ÏÂ Ãæ ÊÇ ´ó ÖÂ µÄ ´ú Âë £º 
    Private Sub cmdFilter_Click() 
     On Error GoTo FilterErr 
     
     Dim recRecordset1 As Recordset, recRecordset2 As Recordset 
     Dim sFilterStr As String 
     
     If Data1.RecordsetType = vbRSTypeTable Then 
     Beep 
     MsgBox "²» ÄÜ ¹ý ÂË ±í ¼Ç Â¼ ¼¯ £¡ ", 48 
     Exit Sub 
     End If 
     
     Set recRecordset1 = Data1.Recordset '¸´ ÖÆ ¼Ç Â¼ ¼¯ 
     
     sFilterStr = InputBox("Êä Èë ¹ý ÂË Æ÷ ±í ´ï Ê½ £º ") 
     If Len(sFilterStr) = 0 Then Exit Sub 
     
     Screen.MousePointer = vbHourglass 
     recRecordset1.Filter = sFilterStr 
     Set recRecordset2 = recRecordset1.OpenRecordset(recRecordset1.Type) '½¨ Á¢ ¹ý ÂË Æ÷ 
     Set Data1.Recordset = recRecordset2 '¸³ Öµ Îª ³õ Ê¼ ¼Ç Â¼ ¼¯ ¶Ô Ïó 
     
     Screen.MousePointer = vbDefault 
     Exit Sub 
     
    FilterErr: 
     Screen.MousePointer = vbDefault 
     MsgBox "´í Îó £º " & Err & "£¬ " & Err.Description 
    End Sub 
<END>
