L
Lindsey M
Hi,
I'm very new to access and I am trying to create a very simple room booking
database that lets the user, wait for it...... book a room! At the moment it
is very basic and I only have three tables:
tblUsers (fields include: UserID, Password)
tblRooms (fields: RoomID, RoomDesc, RoomCapacity)
tblSchedule (fields: ScheduleID, UserID, RoomID, Date, StartTime, EndTime).
I also have two forms, (1) frmLogin and (2) frmBookings - i have mastered
the login screen so that if the user enters the correct user ID and password,
then it will open the frmBookings, if not, error msg displayed.
I will get to my question shortly, promise!
So on the Bookings form, I have a list box (lstRoomReq) that shows the
RoomDesc and RoomCapacity, underneath that I have three further boxes for the
date required (txtDate), start (lstStart) and end (lstEnd) times. I then have
a command button (cmdOK), which is where I am starting to struggle.
Basically, what I need is for when the User selects the room they require
and the date, start & end times, when they click on cmdOK, it searchs to see
if that room is booked out for that date and time, in which case an error
msgbox will be displayed. If it is free, then I want the info to be entered
in the tblSchedule table and for a msg to be displayed confirming the booking.
I'm sorry i've gone so long winded but I thought the more details I gave,
the more likely it is someone will be able to help.
Here's hoping you can, thanks for being patient and getting this far down
the post!!
Cheers
Lindsey
I'm very new to access and I am trying to create a very simple room booking
database that lets the user, wait for it...... book a room! At the moment it
is very basic and I only have three tables:
tblUsers (fields include: UserID, Password)
tblRooms (fields: RoomID, RoomDesc, RoomCapacity)
tblSchedule (fields: ScheduleID, UserID, RoomID, Date, StartTime, EndTime).
I also have two forms, (1) frmLogin and (2) frmBookings - i have mastered
the login screen so that if the user enters the correct user ID and password,
then it will open the frmBookings, if not, error msg displayed.
I will get to my question shortly, promise!
So on the Bookings form, I have a list box (lstRoomReq) that shows the
RoomDesc and RoomCapacity, underneath that I have three further boxes for the
date required (txtDate), start (lstStart) and end (lstEnd) times. I then have
a command button (cmdOK), which is where I am starting to struggle.
Basically, what I need is for when the User selects the room they require
and the date, start & end times, when they click on cmdOK, it searchs to see
if that room is booked out for that date and time, in which case an error
msgbox will be displayed. If it is free, then I want the info to be entered
in the tblSchedule table and for a msg to be displayed confirming the booking.
I'm sorry i've gone so long winded but I thought the more details I gave,
the more likely it is someone will be able to help.
Here's hoping you can, thanks for being patient and getting this far down
the post!!
Cheers
Lindsey