Hi
I have been searching around these forums and found some great examples of things you can do with combo boxes and filters.
I am trying to join 2 examples I have found but with no success.
At present I have 2 different types of combo box, the first:
The second combo box is like this:
This displays all the contractors in tblContractors with the addition of an ALL record at the top so if the user filters with this combo they can click ALL and it will display all the records.
What i would like to be able to do is add an ALL record to the first combo box. I have tried adding the UNION SELECT part of the 2nd combo box but I cannot get it to work correctly.
Please could anyone help me out if this can be achieved with the 1st combo box? Thanks
I have been searching around these forums and found some great examples of things you can do with combo boxes and filters.
I am trying to join 2 examples I have found but with no success.
At present I have 2 different types of combo box, the first:
This lists the contractors found in the query. The DISTINCT part makes it so the combo box only shows the contractor once despite the contractornumber appearing in multiple records.SELECT DISTINCT qryStandResults_No_Visit_0910.ContractorNumber, tblContractors.ContractorName, tblContractors.Address1, tblContractors.Address2 FROM qryStandResults_No_Visit_0910 INNER JOIN tblContractors ON qryStandResults_No_Visit_0910.ContractorNumber=tblContractors.ContractorNumber WHERE (((qryStandResults_No_Visit_0910.ContractorNumber) Is Not Null)) ORDER BY tblContractors.ContractorName;
The second combo box is like this:
SELECT tblContractors.ContractorNumber, tblContractors.ContractorName FROM tblContractors;UNION SELECT "*","<ALL>" FROM tblContractors ORDER BY tblContractors.ContractorName;
This displays all the contractors in tblContractors with the addition of an ALL record at the top so if the user filters with this combo they can click ALL and it will display all the records.
What i would like to be able to do is add an ALL record to the first combo box. I have tried adding the UNION SELECT part of the 2nd combo box but I cannot get it to work correctly.
Please could anyone help me out if this can be achieved with the 1st combo box? Thanks