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!

Form filter using two criteria 1

Status
Not open for further replies.

vanders

Technical User
Mar 20, 2003
4
0
0
GB
I would like to filter a form based on the value of two controls withing the form. I can achieve this for one control using the format,

Me.Filter = "responsibility=" & [cboEmpName]

However when I try to introduce the other criteria, which is a check box, such as

Me.Filter = "responsibility=" & [cboEmpName] And "ckbClosed=" 'False'

I get the message "Type mismatch"

Your help would be greatly appreciated.
 
Try this

Me.Filter = "responsibility='" & [cboEmpName] & "'" And "ckbClosed = False"

-Coco

[auto]
 
Thanks for the suggestion Coco but still get a type mismatch message. By the way the [cboEmpName] is a numeric if that makes any difference.
 
does
Me.Filter = "responsibility=" & [cboEmpName] & " And ckbClosed = False"
work?

-Coco

[auto]
 
Thanks Coco that works, your a star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top