R
richard
Hi
I have a form based on a query. I wish to apply more than one filter to the
form.I am using the docmd.applyfilter event. I have created two filters
strcriteria and strcriteria2. If I apply these seperately they work fine, if
I use then consecutively then only the latter applies. I have tried the code
below but I get an error message saying 'Type Mismatch'
Can someone take a look and give me a way around this problem
Workdate is a date field, so when got error message first time I converted
to a number to see if this solved the problem, actual date is 1/11/2009
Dim strCriteria As String
Dim strCriteria2 As String
strCriteria = "recordinvoiced=" & 0 & ""
strCriteria2 = "Workdate > " & 40118 & ""
DoCmd.ApplyFilter , strCriteria2 And strCriteria
Thanks
Richard
I have a form based on a query. I wish to apply more than one filter to the
form.I am using the docmd.applyfilter event. I have created two filters
strcriteria and strcriteria2. If I apply these seperately they work fine, if
I use then consecutively then only the latter applies. I have tried the code
below but I get an error message saying 'Type Mismatch'
Can someone take a look and give me a way around this problem
Workdate is a date field, so when got error message first time I converted
to a number to see if this solved the problem, actual date is 1/11/2009
Dim strCriteria As String
Dim strCriteria2 As String
strCriteria = "recordinvoiced=" & 0 & ""
strCriteria2 = "Workdate > " & 40118 & ""
DoCmd.ApplyFilter , strCriteria2 And strCriteria
Thanks
Richard