A
Andy Day
At present I am trying to make a database for room bookings at work. I'm at the point where I need the database to check for double bookings on the rooms.
I have this query to detect where double bookings occur:
NoClash: (TblMeetingAppoint_1.MeetingStart>=TblMeetingAppoi nt.MeetingEnd) Or (TblMeetingAppoint_1.MeetingEnd<=TblMeetingAppoint .MeetingStart) Or (TblMeetingAppoint.MeetingDate<>TblMeetingAppoint_ 1.MeetingDate) Or (TblMeetingAppoint.MeetingID=TblMeetingAppoint_1.M eetingID) Or (TblMeetingAppoint.RoomID<> TblMeetingAppoint_1.RoomID)=False
In the form I have the rooms linked to a table with RoomID as the primary key and Roomname for the name of the rooms. You select the room from a combo box on the booking form.
the problem I am facing is that RoomID 3 is actually RoomID 1 and RoomID 2 with a partition removed. So I need to modify the above so that RoomID 1 and 2 will always class with RoomID 3. Whatever way I have tried so far results in no rooms ever clashing or every booking clashes, even if RoomID 4-7 are booked.
EggHeadCafe - Software Developer Portal of Choice
Pass Classes in ASP.NET with LosFormatter
http://www.eggheadcafe.com/tutorial...03-4135280f8c3a/pass-classes-in-aspnet-w.aspx
I have this query to detect where double bookings occur:
NoClash: (TblMeetingAppoint_1.MeetingStart>=TblMeetingAppoi nt.MeetingEnd) Or (TblMeetingAppoint_1.MeetingEnd<=TblMeetingAppoint .MeetingStart) Or (TblMeetingAppoint.MeetingDate<>TblMeetingAppoint_ 1.MeetingDate) Or (TblMeetingAppoint.MeetingID=TblMeetingAppoint_1.M eetingID) Or (TblMeetingAppoint.RoomID<> TblMeetingAppoint_1.RoomID)=False
In the form I have the rooms linked to a table with RoomID as the primary key and Roomname for the name of the rooms. You select the room from a combo box on the booking form.
the problem I am facing is that RoomID 3 is actually RoomID 1 and RoomID 2 with a partition removed. So I need to modify the above so that RoomID 1 and 2 will always class with RoomID 3. Whatever way I have tried so far results in no rooms ever clashing or every booking clashes, even if RoomID 4-7 are booked.
EggHeadCafe - Software Developer Portal of Choice
Pass Classes in ASP.NET with LosFormatter
http://www.eggheadcafe.com/tutorial...03-4135280f8c3a/pass-classes-in-aspnet-w.aspx