You cant use form boxes in a query if there's nothing in them..so..
Test all controls for a possible filter then build the where clause.
Code:
if not isnull(cboState) then sWhere = sWhere & " and [state]='" & cboState & "'"
if not IsNull(txtName) then sWhere = sWhere & " and [Name]='" & txtName & "'"
if not IsNull(chkContact) then sWhere = sWhere & " and [Contact]=" & chkContact.value
'remove 1st And
if len(sWhere)>0 then sWhere= mid(sWhere,5)
'just use the filter for a multi row continuous form
iLen = Len(sWhere) - 5
If iLen <= 0 Then
me.filterOn = false
Else
me.filter = sWhere
me.filterOn = true
End If
'OR
'apply the sql to the form
sSql = "SELECT * FROM tblCompany WHERE " & sWhere