Sorry, wk_com is a date of start of booking.
It wouldn't make much sense to attach the workbook as the data is in an SQL database so all the workbook contains is a list of bookings for a specified week with the client number and carer number, nothing else at all.
So, the select finds the bookings for a week, I then want to find any previous booking for clients that are already in this list, but these are in the same table.
The query I have is:
Code:
SELECT tblBookingsWarehouse.Wk_Com, tblBookingsWarehouse.CarerNo, tblBookingsWarehouse."Client Number"
FROM ch_warehouse.dbo.tblBookingsWarehouse tblBookingsWarehouse
WHERE (tblBookingsWarehouse.Wk_Com=?) AND (tblBookingsWarehouse.Type='Booking')
ORDER BY tblBookingsWarehouse.CarerNo