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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter Syntax Question 1

Status
Not open for further replies.

missymarie1014

Technical User
Mar 15, 2007
50
US
Access 2000.... Can someone tell me why this code produces a type mismatch error. Each filter, when executed separately, works fine. Am I doing something wrong in trying to combine them? These are Boolean fields.

Code:
Private Sub ActiveRawCommand_Click()
On Error GoTo Err_ActiveRawCommand_Click

    Me.Filter = "InactiveProduct = 0" And "IsBulkProduct = 0"
    Me.FilterOn = True

Exit_ActiveRawCommand_Click:
    Exit Sub

Err_ActiveRawCommand_Click:
    MsgBox Err.Description
    Resume Exit_ActiveRawCommand_Click
    
End Sub
 
Me.Filter = "InactiveProduct = 0 And IsBulkProduct = 0"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Well, now I feel like an idiot! Thanks PHV. Very helpful as usual! Sometimes the simplest things are so difficult.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top