Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2002
    Posts
    49

    Unanswered: Is this possible?

    I have spent the last few days reviewing all the posts in this forum. I am currently tasked with developing a database for my company. One of the first things that I need to accomplish is to be able to select (and assign) one table to another table (using the ID field) based on availability.

    Perhaps an example is in order (please forgive me, but I am unable to give the actual names or application):

    My database is for reservations at a hotel. This particular hotel has multiple hotels in the same city. I need the ability to "book" a room at any of the three based on room availability. Basically I need to be able to select an available room at the hotel of my choice and "reserve" it for the customer.

    I know it is hard to understand, but I am restricted from giving specifics. My question is how would you attempt this. My idea so far is"

    A combo box to select the hotel preferred. A subform will filter out reserved rooms based on the combo box. Up to this point there is no problem (a fairly simple filter method), but now the problems start. How would you reserve an empty room (at the reservationist’s choice) based on this? I have added a checkbox field; an unbound field to re enter in the info (I would like to avoid this route unless it is the only way to go), etc. Also, this particular problem arose while I was still using Access 97 (I'm now on 2000 but haven't gotten to this point in a complete overhaul of the project yet).

    Any and all suggestions will be welcome and appreciated.

  2. #2
    Join Date
    Nov 2002
    Location
    Canada
    Posts
    4

    Lightbulb

    no solution but an idea - try setting a variable(variant) to the value of the combobox through an eventprocedure (say an ondblclick event) and pass this to a form where you take down the details of the clients reservation.(name, dates, and credit card info)
    You could also add an onchange event tied to a subform or two to present the receptionist with a summary of dates that the room is free (incase a client requests a certain room), and a description of the room (2 beds overlooking oasis with morning sun.)

  3. #3
    Join Date
    Nov 2002
    Posts
    49
    I'll look into that as a possibility. Thanks Blackhand!!

    I would like to add that before this step, the customer's information has been gathered. So all I need to do is be able to select determine which room (out of the not reserved ones) the receptionist decides to reserve for the customer. Depending on the day, there may be from 1 to 40 rooms available at each hotel. Waiting for some more great suggestions.

  4. #4
    Join Date
    Sep 2002
    Location
    South Wales
    Posts
    580

    Wink Bookings

    If you can wait 'til the weekend, I will post a suggested solution.

    GD

  5. #5
    Join Date
    Sep 2002
    Location
    Land of OZ
    Posts
    173

    Re: Is this possible?

    What is your table structure? Perhaps that will give me an idea of a solution. I implemented a system that we have used to book meeting rooms (same as hotels rooms is guess) in different offices and did not encounter any issues with this.

    I am more than happy to provide with a solution, but will need to know what your table structures are so I can tailor a solution to your scenario.

    The tables that I used were
    tblRooms - list of all rooms
    tblOffices - list of all offices (linked to tblRooms)
    tblBooking - list of all confirmed, tentative, inqury bookings (linked to tblRooms and tblPeople)
    tblPeople - client within the system that request room bookings


    Are you using any code to do this? or Update queries?


    Originally posted by saundone
    I have spent the last few days reviewing all the posts in this forum. I am currently tasked with developing a database for my company. One of the first things that I need to accomplish is to be able to select (and assign) one table to another table (using the ID field) based on availability.

    Perhaps an example is in order (please forgive me, but I am unable to give the actual names or application):

    My database is for reservations at a hotel. This particular hotel has multiple hotels in the same city. I need the ability to "book" a room at any of the three based on room availability. Basically I need to be able to select an available room at the hotel of my choice and "reserve" it for the customer.

    I know it is hard to understand, but I am restricted from giving specifics. My question is how would you attempt this. My idea so far is"

    A combo box to select the hotel preferred. A subform will filter out reserved rooms based on the combo box. Up to this point there is no problem (a fairly simple filter method), but now the problems start. How would you reserve an empty room (at the reservationist’s choice) based on this? I have added a checkbox field; an unbound field to re enter in the info (I would like to avoid this route unless it is the only way to go), etc. Also, this particular problem arose while I was still using Access 97 (I'm now on 2000 but haven't gotten to this point in a complete overhaul of the project yet).

    Any and all suggestions will be welcome and appreciated.

  6. #6
    Join Date
    Nov 2002
    Posts
    49
    I have conqured this problem. For those interested, I have a combo box and a sub form (records are selected based on room availability) as child (sub form) and master (combo box). I use the on click and dbl click events for the sub form to set the customer id = in two different tables (customers info and rooms(contains all rooms for all hotels)). On a cmd button click, all records are updated. My question now is it possible to automatically have the last room at a particular hotel be selected w/o having to click on the sub form?

    Also, if you have an alternate idea for this procedure I would love to hear it. I'm sure that I'll encounter more prob's as I go along, so any help now is greatly appreciated.

  7. #7
    Join Date
    Sep 2002
    Location
    Land of OZ
    Posts
    173
    Are you writing any code.

    If so, write code that will give you the recordset of the number of rooms that are left.
    Do a count of the recordset, if there is only one record, select that record

    Try this

    Dim DB as DAO.Database
    Dim RMS as DAO.Recordset

    Set DB = CurrentDB()
    Set RMS = DB.OpenRecordset(NameOfQueryThatUsedToFindAvailRoo m)

    If RMS.RecordCount = 1 Then 'only one room in the result
    'Assuming that the first field in the query is the same as the first field in the combobox
    Combobox.Value = RMS(0)
    End If

    Hope this helps ....



    Originally posted by saundone
    I have conqured this problem. For those interested, I have a combo box and a sub form (records are selected based on room availability) as child (sub form) and master (combo box). I use the on click and dbl click events for the sub form to set the customer id = in two different tables (customers info and rooms(contains all rooms for all hotels)). On a cmd button click, all records are updated. My question now is it possible to automatically have the last room at a particular hotel be selected w/o having to click on the sub form?

    Also, if you have an alternate idea for this procedure I would love to hear it. I'm sure that I'll encounter more prob's as I go along, so any help now is greatly appreciated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •