I think you may be looking for something more along the lines of
This is aircode so may need adjustments, wildcards or delimiting, but hopefully you get the idea.Code:dim strCrit as string If not IsNull(txtCitNumFilter) Then strCrit = strCrit & "And [Citation Num] = """ & txtCitNumFilter & """" End If If not IsNull(txtClerkFilter) Then strCrit = strCrit & "AND [Clerk] = """ & txtClerkFilter & """" End If 'strip off the leading "And" If nz(strCrit,"")<>"" then strcrit = mid(strcrit,4) end if debug.print strCrit me.filter = strcrit me.filteron = true
Doing it with "Like" may look like this
You may also want to use the Me keyword as in Me.txtCitNumFilterCode:strCrit = strCrit & "And [Citation Num] Like ""*" & txtCitNumFilter & "*"""