Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

filter 1

Status
Not open for further replies.

herd

Technical User
Jun 23, 2003
46
0
0
US
How can I used a command button in a form to filter all records in which a check box is checked on that record.


Thanks Gary
 
If your button is called cmdFilter, and the field to which your checkbox is bound is a boolean called CheckIt (untested):
Code:
Private Sub cmdFilter_Click()
On Error GoTo Err_cmdFilter_Click

    DoCmd.ApplyFilter , "CheckIt = -1"
    
Exit_cmdFilter_Click:
    Exit Sub

Err_cmdFilter_Click:
    MsgBox Err.Number & ": " & Err.Description, vbExclamation
    Resume Exit_cmdFilter_Click
    
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top