Adding Additional Filter Criteria to Existing Code

Zippersabrat

Blah Blah Blah :o)
Local time
Yesterday, 17:07
Joined
May 5, 2010
Messages
31
Hi All,

I am trying to add an additional filter criteria to the below. This is a selection drop-down to filter on [Product Product Type]. I want it to also filter the main form to show only those records where [ActionCmb] is null. I have gone round and round and just cannot get it to work. Any help would be greatly appreciated!

Code:
Private Sub TypeCmb_AfterUpdate()

If TypeCmb <> "All" Then

DoCmd.ApplyFilter "", "[Product Product Type]='" & Me.[TypeCmb].Value & "'"

Else

DoCmd.ApplyFilter "", "[Product Product Type] Like ""*"""

End If

End Sub
 
Hi. Have you tried something like?

Code:
DoCmd.ApplyFilter "", "[Product Product Type]='" & Me.[TypeCmb].Value & "' AND [ActionCmb] Is Null"
That's assuming ActionCmb is a field name. Correct?
 
Yes but I swear it threw an error. I must have had an extra quotation mark or a missing one somewhere. Thank you! :)
 
Yes but I swear it threw an error. I must have had an extra quotation mark or a missing one somewhere. Thank you! :)
Hi. Glad to hear it's fixed now. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom