tucker61
03-21-2008, 01:18 AM
I have a combo box called txtSearch which i want to filter out the contents so it only included records based on another 2 combo box called cboRowField and Weeksearch
I Managed to get the filter working just off 1 of my combo boxes Code works Below), but ideally need it to filter off them both.
"SELECT DISTINCT tblData.staffid FROM tblData WHERE (((tbldata.name)=Forms!frmdata!cboRowField)) ORDER BY tblData.staffid; "
I have tried
"SELECT DISTINCT tblData.staffid FROM tblData WHERE (((tbldata.name)=Forms!frmdata!cboRowField)) AND WHERE (((tbldata.Week)=Forms!frmdata!Week)) ORDER BY tblData.staffid;"
and also
SELECT DISTINCT tblData.staffid FROM tblData WHERE (((tbldata.name)=Forms!frmdata!cboRowField)) & WHERE (((tbldata.Week)=Forms!frmdata!Week)) ORDER BY tblData.staffid;
can anyone advise what i am doing wrong ?
thanks in advance
I Managed to get the filter working just off 1 of my combo boxes Code works Below), but ideally need it to filter off them both.
"SELECT DISTINCT tblData.staffid FROM tblData WHERE (((tbldata.name)=Forms!frmdata!cboRowField)) ORDER BY tblData.staffid; "
I have tried
"SELECT DISTINCT tblData.staffid FROM tblData WHERE (((tbldata.name)=Forms!frmdata!cboRowField)) AND WHERE (((tbldata.Week)=Forms!frmdata!Week)) ORDER BY tblData.staffid;"
and also
SELECT DISTINCT tblData.staffid FROM tblData WHERE (((tbldata.name)=Forms!frmdata!cboRowField)) & WHERE (((tbldata.Week)=Forms!frmdata!Week)) ORDER BY tblData.staffid;
can anyone advise what i am doing wrong ?
thanks in advance