I hope this is in the right place.
I have a form(frmCustomerSelect) with a listbox which gets its data from a query(QryCustomerSelect).
The query gets its data from a customer\supplier table, the table has two checkbox columns , one for customer and one for supplier.
When i enter an accountcode(pk) into a textbox on the form it lists all the matching customers and suppliers but i only want it to match the customers.
this is the sql data behind the query :
SELECT accountcode, Companyname, address1, Telephone
FROM TblCS
WHERE accountcode Like '**'
ORDER BY accountcode;
My question is can i add a second WHERE statement to this or do i have to create another query to select just customers and the use that query as the recordsource of QryCustomerSelect.
Thanks in advance for your help
Gareth
I have a form(frmCustomerSelect) with a listbox which gets its data from a query(QryCustomerSelect).
The query gets its data from a customer\supplier table, the table has two checkbox columns , one for customer and one for supplier.
When i enter an accountcode(pk) into a textbox on the form it lists all the matching customers and suppliers but i only want it to match the customers.
this is the sql data behind the query :
SELECT accountcode, Companyname, address1, Telephone
FROM TblCS
WHERE accountcode Like '**'
ORDER BY accountcode;
My question is can i add a second WHERE statement to this or do i have to create another query to select just customers and the use that query as the recordsource of QryCustomerSelect.
Thanks in advance for your help
Gareth