这是关系和 Pasenger_detail 表格的图片,我写了查询来选择座位号,但它不能正常工作。它只显示根据公共汽车保留 ID 的所有座位。但要求仅显示尚未选择的那些。这是查询
"Select seat_no.seat_no FROM Seat_No Where seat_no.seat_no <= (select br_info.Seats_Reserved from br_info where ((Br_info.br_id)=[forms]![pasenger_detail]![br_id]) AND (Seat_No.seat_no) NOT IN (SELECT Pasenger_Detail.Seat_No FROM Pasenger_Detail WHERE (((Pasenger_Detail.Group_ID)=[forms]![Pasenger_Detail]![Group_ID]) AND ((Pasenger_Detail.BR_ID)=[forms]![Pasenger_Detail]![BR_ID]))));"