silversofttail
New member
- Local time
- Today, 14:24
- Joined
- Aug 8, 2012
- Messages
- 7
I have a query of factories and their customers. My search form has a drop down box that performs the query by customer. The query is looking up the factory by customer: A, B, C. How can I have the drop down box just show the choices of A, B, C instead of A,A,A, B,B,C,C,C,C. I added Distinct to the SQL hoping that it would just show the one instance. Any help would be greatly appreciated.
Here is the SQL:
SELECT DISTINCT QrySupplier_Customer.Customer, tblFactory.FactoryName, tblFactory.FactoryStatus, QrySupplier_Customer.Category
FROM QrySupplier_Customer INNER JOIN tblFactory ON QrySupplier_Customer.FactoryID = tblFactory.FactoryID
WHERE (((QrySupplier_Customer.Customer) Like [Forms]![frmSearch].[ComboActiveFactories] & "*") AND ((tblFactory.FactoryStatus)="Active"))
ORDER BY QrySupplier_Customer.Customer;
Here is the SQL:
SELECT DISTINCT QrySupplier_Customer.Customer, tblFactory.FactoryName, tblFactory.FactoryStatus, QrySupplier_Customer.Category
FROM QrySupplier_Customer INNER JOIN tblFactory ON QrySupplier_Customer.FactoryID = tblFactory.FactoryID
WHERE (((QrySupplier_Customer.Customer) Like [Forms]![frmSearch].[ComboActiveFactories] & "*") AND ((tblFactory.FactoryStatus)="Active"))
ORDER BY QrySupplier_Customer.Customer;