Im creating a search form for my database and written the following SQL for it,
SELECT Rooms.Room_id, Rooms.Sleeps, Rooms.Type, Rooms.Phone Number, Rooms.Price, Bookings.Date
FROM Rooms, Bookings
WHERE Date="txtdate", Type="cbtype";
I have two fields one being "txtdate" and one being a combo box "cbtype".
I want the user to be able to type in a date and choose a room type from the combo box and upon clicking the search button results of all the empty rooms are displayed in a listbox.
anothing thing it should look up the bookings table and checks the contents of txtdate on the search form with the contents of the arrival date field on the bookings table and if the users entered date is the same as an existing booking it will display booked in the list box.
Im sorry if thats confusing If you dont quite get what im on about i'll try and explain it in a differnt way.
Thanks,
RT
SELECT Rooms.Room_id, Rooms.Sleeps, Rooms.Type, Rooms.Phone Number, Rooms.Price, Bookings.Date
FROM Rooms, Bookings
WHERE Date="txtdate", Type="cbtype";
I have two fields one being "txtdate" and one being a combo box "cbtype".
I want the user to be able to type in a date and choose a room type from the combo box and upon clicking the search button results of all the empty rooms are displayed in a listbox.
anothing thing it should look up the bookings table and checks the contents of txtdate on the search form with the contents of the arrival date field on the bookings table and if the users entered date is the same as an existing booking it will display booked in the list box.
Im sorry if thats confusing If you dont quite get what im on about i'll try and explain it in a differnt way.
Thanks,
RT