Hotel Room Availability Query

Feb 22, 2007

Hi Everyone,
hope someone out there can figure this one out.


I am developing an access database and forms based on a hotel booking system.
There is a tblRoomState table, which holds the roomID, the date and the state of the room, (so for a 3 night stay, this table holds three entries).
I have a query which returns any roomID's from the tblRoomState table which have a state value of 1 at a specified date.
I want to run another query which returns roomID's from the tblRoom table which are not part of the recordset of the first query.


Since there is no records held in the database for rooms which are not booked, the only way to access "availability" is to use a recordset of rooms which are booked and test against that.

Thanks,
John

View Replies


ADVERTISEMENT

Accommodation Database - Availability With Shared Room Capacity

Feb 6, 2007

Hi,
I have been reading throguh various articles and learning a lot from you guys, so thank you very much. This place is a fantastic source of information, by far the best of anything i have found online.

I have a question which i would be grateful if someone could advise upon.

Access 2003. I have 4 tables:

list_accommodation (holding host family address details who offer accommodation to students)
id (autonum)
name (text)
address (text)
etc.....

list_rooms (table of rooms offered by host families)
room_id (autonum)
host_id (number) - joined to list_accommodation.id
room_name (text)
capacity (number)

students (student contact details who want accommodation!)
id (autonumber)
name (text)
dateofbirth (date)
address (text_
etc.....


bookings_accommodation (to hold the accomm bookings)
booking_id (autonum)
room_id (num) - joined to list_rooms.room_id
student_id (num) - joined to students.id
start_date (date)
end_date (date)

This structure therefore enables me to query if rooms are booked between dates:

SELECT bookings_accommodation.room_id, bookings_accommodation.start_date, bookings_accommodation.end_date
FROM list_rooms INNER JOIN bookings_accommodation ON list_rooms.room_id = bookings_accommodation.room_id
WHERE (((bookings_accommodation.start_date) Between DateAdd("d",0,[Forms]![workflow]![workflow_sub_add_accom_booking]![cbo_start_date]) And DateAdd("d",-1,[Forms]![workflow]![workflow_sub_add_accom_booking]![cbo_end_date]))) OR ((([end_date]-1) Between DateAdd("d",0,[Forms]![workflow]![workflow_sub_add_accom_booking]![cbo_start_date]) And DateAdd("d","0",[Forms]![workflow]![workflow_sub_add_accom_booking]![cbo_end_date]))) OR (((bookings_accommodation.start_date)<DateAdd("d",0,[Forms]![workflow]![workflow_sub_add_accom_booking]![cbo_start_date])) AND (([end_date]-1)>DateAdd("d","-1",[Forms]![workflow]![workflow_sub_add_accom_booking]![cbo_end_date])));


and therefore, using the 'booked' query i can therefore find out rooms are available.

SELECT list_rooms.room_id, list_rooms.room_name, list_rooms.capacity, list_rooms.description, list_rooms.host_id
FROM list_rooms LEFT JOIN qry_rooms_reserved ON list_rooms.room_id = qry_rooms_reserved.room_id
WHERE (((qry_rooms_reserved.room_id) Is Null));

----

so, now i have found out that there is a necessity to enable students to share a room (the bookings for a room may not happen at the same time). This means that i have to determine the capacity of a room and therefore if
the capacity is not full, then show as available.

I was wondering what the best approach to this may be?
I have added 'capacity' to list_rooms, but i am unsure as to how to go from there....

Any thoughts and advice woudl be really appreciated.

Many thanks

Phil.

View 2 Replies View Related

Database For Hotel System - Prevent Double Bookings

May 23, 2014

I am supposed to make a database for a hotel system, how I could prevent double bookings.

My Reservation Table has the following fields:

Reservation No. (PK)
Room No. (FK)
Customer ID (FK)
Payment ID(FK)
Reservation In Date
Reservation Out Date

Together with preventing double bookings is there a way automatically that can mark in the Room Table, the status as "available" or "booked" automatically by looking at the date today?

View 3 Replies View Related

Checking Date Availability

Jan 5, 2006

Hi all, hope you can help me:



Basically what im trying to do is a database which checks to see if something is available.

The database is a booking system for services. I need the database to check a "booking" table to see if there is a booking on a specific date. If there is, then you cannot make a booking. If there isn't then you can.

In my "booking table" there is a list of dates of bookings. Each booking lasts a week. So if someone wants to make a booking, it cant just check to see if the first day is available, it needs to check for 6 additional days. (i.e. a booking on 01 Jan 2006). If someone wants to make a booking, the database needs to account for a whole week, so the next available booking would be on 07 Jan 2006).

How can this be done in the simplist way?

Thanks all.

View 1 Replies View Related

Availability Of Records In Report Group Headers???

Sep 3, 2004

I need to write a report with the following groupings

Customer_GroupHeader
State_Groupheader
Client_Groupheader
Detail Section
Client_Groupfooter
State_Groupfooter
Customer_Groupfooter

What I have noticed, I maybe wrong, the record is a available for the "group_header" section closest to the detai section, in my case, "Client_GroupHeader". However, I need information in the record to format goup header information in the "Customer_Groupheader" and "State_Groupheader. Can anyone help me with this.

thank you
newbie and learning

View 1 Replies View Related

Forms :: Record Availability Of Volunteers For Different Events In Database

Jul 14, 2013

I am trying to create a database that will record the availability of volunteers for different events.

So far, I have used access to create an availability table, that contains fields for event, date, name, shift 1, shift 2, shift 3.

I now want to create a form that will filter this table for a given event, then layout the form so that names appear down the left, date across the top, and then the shift 1 to 3 fields (which are yes/no fields) to appear in the body of the layout.

This is so the organising team can quickly enter this information (received by phone, email, fax) into the database. I have had a go with subforms within subforms but so far drawing blanks.

View 1 Replies View Related

Forms :: Combo Box Selection Controlling Checkbox Availability

Oct 6, 2014

I have a project database where I keep track of the work in progress on monthly bookkeeping for our clients. I have a form where I use a ComboBox to select the client and another ComboBox to select whether a sales tax report must be filed Monthly, Quarterly or Annually. I have 17 CheckBoxes one for every month, quarter and year-end. I want the selection in the sales tax reporting ComboBox to trigger which CheckBoxes are available to check.

That is, if "Monthly" is selected in the ComboBox, then only the 12 monthly CheckBoxes are available to check (the 4 quarterly and 1 year-end CheckBoxes will be disabled). If "Quarterly" is selected in the ComboBox then only the 4 quarterly CheckBoxes are available to check. Of course, "Annual" is the third option. The disabling of CheckBoxes must be on a record by record basis. "Monthly" could be selected for one client (one record) and "Quarterly" for another client (another record).

View 14 Replies View Related

Room Scheduler

Nov 15, 2005

I want to build a room scheduler. Before I get too far in to my first attempts, does anyone know if there any examples out there I can use to give me ideas?

If not I wonder can anyone advise me as to a difficulty I currently can see with what my attempts so far. I have built a very basic database with fields for each room and time slots through each day. This works ok. The problem I see is finding a way of setting a room booked for say "every Thursday between 14.00 and 15:00". I have considered using a query to do it but cannot see how to formulate it.

Thanks in advance for any help you may offer.

Peter

View 2 Replies View Related

Room Booking

Mar 1, 2005

Hi All,

I am in the process of creating a Room Bookings database using the limited graphical tools of Access 2003.
I intend to break up the day from 0700 to 1900 into 48 X 15 minute chunks (the minimum bookable time) and have these graphically represented on the form as boxes whose colour change depending on whether it is booked and who by.
It would be normal to have up to 8 colours available for this as any one room would be unlikely to be booked by more than 8 people in one day.
I would envisage that each day would be covered by a separate subform.

Has anyone else tried a graphical representation of a booking form?

It would be interesting to hear others views or experiences...

Dave E

View 2 Replies View Related

Help On Room Filter

Mar 4, 2008

Hi

I currently am in the the middle of creating a database to hold details of computer hardware in stock.

I have created a query which simply lists all the items in the main table, then a form pulls the infomation from the query and displays all the items.

On the main page I have some buttons labled Room1,Room2,Room3...etc

What I am wanting to do is to press a button and it show the form but only the items from that room.

I could do this by creating many querys and then forms and having each button link to its correct form however this isn't ideal.

Does anyone know how to get the form to display only items from the query that are set by each button

Thanks
Chris

View 2 Replies View Related

Room Scheduling

Nov 8, 2005

Can anyone point me in the direction of a room scheduling example or a tutor site. I originally wanted to use Outlook but my boss, after seeing another Acces Project I did, asked for it in the Access. I can build a basic data base on a daily basis showing rooms against hours, but my problem is forward scheduling eg "every Thursday meeting room 1 will be for Group A" etc. Can anyone please get me started - I'm tearing my hair out on this one!

Thanks in advance.

Peter

View 1 Replies View Related

Room Booking System

Mar 31, 2008

Is there still a hotel/room booking system sample database available on the forum?

I remember seeing one a while back in the samples forum but can't find the thread now.

If it's not here anymore does anyone know of any samples I can look at?

View 5 Replies View Related

Forms :: How To Check Date Availability In A Form From A List Of Dates In A Table

Dec 16, 2014

I am making a Car Rental database on Access 2010, and I have a list of the dates available to rent a car in a table. I want to be able to check what dates are available and select a date for hire in a form.

View 3 Replies View Related

Queries :: Calculate Base Income Per Room Type

Apr 24, 2013

I have to create a query to calculate the Base Income per room.

Guest 1-4 is the standard room rate say $125/day, guests 5 & 6 pay additional $20 charge per day. Guests staying for seven days or more receive a 10% discount. How to build this expression into a query in access. If it was Excel that would be easier.

Table info I have is:
Room
Arrival Date
Departure Date
No of Guest (per room)
Daily Rate

View 6 Replies View Related

Queries :: Booking System - Finding Available Room For Date Range?

Feb 18, 2014

So I'm trying to do this database for my ICT coursework and its a full system for dog kennels.

So in actuality the rooms are kennels.

I have a table tblbookings that amongst others has fields:

Kennel No
Date In
Date Out

I need a way of users entering the requested dates for a new booking and getting an output of a list of all kennels that are available to book for that full date range or even better, a way of running this straight from the form for a new booking frmbookings to just leave the first available kennel no. in the field KennelNo?

View 5 Replies View Related

Forms :: Preventing Double Booking Of Room In Form Based On Multiple Criteria

Aug 13, 2015

I have Table for rooms called Rooms, and the data in the table is roomNumber which is in the format Letter and two Digit number, so A01 would be dorm building A and room building 1, and I then have a seperate row named roomType that is either VIP or Semi Private.

Now I am creating a form where a worker will put in there scheduledCheckin date and scheduledCheckout date and it will be written to the Bookings table. I would like this form however to take the dates they have put in, as well as room type (Semi-Private or VIP, and assign them an available room that isn't booked at all in that range) or list all available rooms for that range of time and they could then just select the room. I would rather it automatically assigns an available room based on room type though because this check in system is going to have about 500 rooms.

I've attached a link for what I have so far. I know how to make a query to list anyone who has booked rooms over that date, but need one for just preventing booking the same room.

[URL] .....

View 3 Replies View Related

Column Names. Can I Make The Name Field "higher"? (to Make Room For More Lines)

Sep 25, 2006

I'm currently working with a form, which is in datasheet view. I have many rows which are combo boxes (yes/no), and the name is rather long. So each line (each row) spreads on to 2-3 pages to the right.What I would like to do is make the namebar, on top of every column, a little bit higher, so the name would be split into two lines, or three. Allowing me to make the width allot smaller.Here is an example of my problem:http://213.213.137.96/~terminal/columns.jpgSo my question is, can I change the height of the column name? Or is there some trick I can use?regardsFrímann Kjerúlf

View 1 Replies View Related

Query In Forms Question (printing A Single Selected Query Record From A Form?)

Oct 19, 2004

What is the best way to impliment a query in a form so that the user can view the query records, and have the option to print or save the selected record using command buttons?

I tried subforms but I could not get the command buttons to work in the subform after it went into the form, it wanted to print the entire form instead of the selected record from the subform.

So in a nutshell I have 3-4 queries that are built, and I want to have them show up on my form in a format that the user can scroll through the results and select a single record of the results and then print or save that individual record from the form, if such a thing is possible.

Thanks in advance

Todd

View 1 Replies View Related

Queries :: Join Results Of Unmatched Query With Matched Query To Include Null

Mar 24, 2013

I am trying to do the good 'ol sales report (query) to include customers with no sales.

I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)

If I run a query to show customers (in the customer table) with account numbers, that works

An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).

How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?

I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?

View 3 Replies View Related

Queries :: Opening Design View Of Append Query Without Timing Out Source Query

Mar 4, 2015

In some cases I create pass-through queries and use these in an Append or Make-table query to bring data locally.

All is well and fine until source data changes and the pass-through query runs too long and times out.

If needed, I can extend the timeout value in the Parameters of the pass-through query no problem, but when I try to open the Append or Make-table query in Design view to do the same, the pass-through query is first triggered and then throws the timeout, and I cannot access the Design view of the Append or Make-table

Is there a way to open an Append or Make-table query in Design view without invoking the source query?

View 1 Replies View Related

UNION Query MS Jet Database Engine Cannot Find The Input Table Or Query.

Oct 28, 2005

Hello All,

I'm trying to run a UNION query that joins five queries through a MS WorkSpace into a DAO.recordset in VB. I'm pulling the data from a SQL Server Database through VB in Access. I'm attempting to open a recordset with a query passed to it as a string. The query is below. For some reason, I'm receiving a message: "MS Jet database engine cannot find the input table or query. Runtime Error 3078".

Here's what's puzzling. When I run a single query without any UNION statement, the code finds the table and runs fine without error, but anytime I join two or more queries with a UNION statement in the VB, it gives me the error.

I've executed the same UNION query in both Access Query Builder and SQL Server's Query Analyzer and they work fine in both environments. It's only when I call the query from a DAO.Recodset with VB that it causes this problem. The following is a sample of the UNION query joining two of the five queries. Does anyone have any idea what could be the problem? The following query executes in about 5 seconds so I don't think there's a "time-out" issue. I'm thinking that the UNION statement may be the culprit. Maybe there's another way to approach joining these separate queries? Any help would be most appreciated. Thanks.

SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((CategoryID) = 'HCPROD') AND ((BrandID)<>'CSS')) AND (((BrandID)<>'1356')) AND (((BrandID)<>'1400')) AND (((BrandID)<>'1551')) AND (((BrandID)<>'555')) AND (((BrandID)<>'66'))
AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID
UNION
SELECT SalespersonID, Sum([SlsPrice]-[RtnPrice]-[SlsDiscnt]+[RtnDiscnt]) AS fldPrice FROM MyTable WHERE (((Source)='d') AND ((DistrictID)='01') AND ((ProductID) = '0029800')) AND (TransDate >= 07/01/2005) AND (TransDate <= 07/31/2005) GROUP BY SalespersonID

Set wrkJet = CreateWorkspace("", "pw", "", dbUseJet)
Set db = wrkJet.OpenDatabase("DW", _
dbDriverNoPrompt, True, _
"ODBC;DATABASE=DW;DSN=DW2")
'Set rs1 = db.OpenRecordset(strSQL)

View 9 Replies View Related

Queries :: Export Query To Excel Then Delete Query Data From Table

Nov 20, 2013

I am wondering if there is a quicker way to export a query to excel then have the data in that query removed from the original table. (effectively cutting the data from the table and exporting to excel)

I understand that this can be done by exporting the query to excel then running the same query as a delete query to remove the data but I just wondered if this is the most efficient way.

I have experience of VB in excel but currently only use the basic macro builder in Access though if Access VB is more efficient I can easily learn.

View 5 Replies View Related

Queries :: Update A Query Based On Results From Another Query Using Count Function

Apr 2, 2013

I run a physical therapy office and patients come in for treatment either 3, 4 or 5 times per week. My database is used to track these frequencies (among other things).

I have 3 queries which count how many patients come in 5, 4 and 3 times/week.

In my main table I have fields called "how many 5's", "how many 4's" and "how many 3's".

I have tried to design an update query which will update those fileds in my main table to reflect the counts in the 3 queries mentioned above.

(I'm not using SQL view, I'm using the query design view)

In the "update to:" row, I use the Build function and locate the count I'm looking for.

Problem: when I run the query I get the error: Operation must use an updateable query.

View 3 Replies View Related

Queries :: Crsosstab Query Doesn't Recognize Expression In Source Query

Aug 12, 2015

I have a query where these are the fields:

ProductRevType
RevLag
RevFlowThru
CloseMoYr
ProjRevDate
CurrentMRC
ProjRevMRC

The ProjRevMRC field is an expression that reads:ProjRevMRC: IIf([ProjRevDate]>=DateSerial(Year(Date()),Month(Date()),1),[CurrentMRC]*[qry303a_ SFADetailMRC_ONLY]![Rev Flow Through],0)

When I run the query, it works perfectly, but when I created a crosstab query to show totals by month, I wanted the totals to be zero for the months less than the current month. Is there a way for the crosstab query to execute the expression and put zeroes for those months?

View 4 Replies View Related

Queries :: How To Insert A Prompt For Number In A Query To Calculate Against Another Field In Query

Jul 15, 2014

I have a field that is giving me the number of business days between a period of time and then I want to subtract that number - the person's PTO time to see the actual days they were available...when I simply type the number in (see below) it works great but I want to set up a prompt that will ask me how many PTO Days to calculate as it will be different for each person I am quering...is this possible?

View 9 Replies View Related

Forms :: Update Form / Query Without Updating Underlying Tables To Query

Jul 23, 2015

I have a form which will be used as the basis to print a label.

It is bound to a query and when I open the form I pass over a 'where' condition to return 1 record. I then use the query to produce a report/label.

What I want to do is to update the form/query without updating the underlying tables to the query.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved