2 Bound List Boxes

Weste

Newcomer
Joined
Feb 4, 2005
Messages
14
I have 2 list boxes bound to a database. The 1st list box displays services ordered by the customer. I want the 2nd list box to display services not yet ordered by the customer.

For example. My services are A, B, C, D and the customer has ordered A and B.

List box 1 should show A, B
List box 2 should show C,D

I have list box 1 working. Can someone give me some help as to how I need to setup the query for list box 2? Thanks for your help.

Weste
 
Problem Solved!

The query below solved by problem.

SELECT Services.ServiceID, Services.ServiceName
FROM Services
LEFT JOIN (SELECT ServiceSales.SalesID, ServiceSales.ServiceID FROM ServiceSales WHERE ServiceSales.SalesID = @Param1) AS B
ON Services.ServiceID = B.ServiceID
WHERE B.ServiceID Is Null
 
Back
Top