Have you tried :
Test all controls for a possible filter, if not used, skip it...
Code:
If not isnull(cboState) then sWhere = sWhere & " and [state] like '*" & cboState & "*'"
If not IsNull(txtName) then sWhere = sWhere & " and [Name] like '*" & txtName & "*'"
If not IsNull(txtContact) then sWhere = sWhere & " and [Contact] like '*" & txtContact.value & "*'"
'remove 1st And
sWhere= mid(sWhere,4)
sSql = "SELECT * FROM tblCompany WHERE "
sSql = sSql & sWhere
'apply the sql to the form
'OR
'just use the filter
me.filter = sWhere
me.filterOn = true