Your sql is limited to the AND and will only work if you enter something in every box.
You should allow for the option of inputing only 1 box. Then you must cycle thru all boxes to see what got entered an use only that one.
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
sWhere= mid(sWhere,5)
sSql = "SELECT * FROM tblCompany WHERE " & sWhere
'save the sql as a qry or open the sql
set qdf = currentdb.querydefs("qsResults")
qdf.sql = ssql
qdf.close
docmd.openquery qdf.name
you can make queries for each table (like above)
then open them all at the end once you attach the where clause.