I have a room availabilty form that uses the calendar control to enter the requested reservation Date via two combo boxes. I have a command button that is supposed to check my reservations table for available rooms based on the two dates. I have an sql query that already searches for collisions:
SELECT *
FROM tblReservations
WHERE Room_Num NOT in (select Room_Num from tblReservations where RequestedStartDate <= EndBookingDate and RequestedEndDate >= StartBookingDate );
Question #1
How do I program my button to return the rooms available for reservations based on the two dates Entered?
Question #2
Can I modify my sql in order to only return reservation that are confirmed? (note I have a confirmation field in my reservations table)