Results 1 to 2 of 2
  1. #1
    POS120 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    1

    Query and report assistance

    I have an exercise that asks the following questions for the attached database.

    The database has the following fields left to right

    Guest first name, guest last name, room, room type, arrival date, departure date, no of guests, daily rate

    1. What is the average length of stay per room
    2.What is the average number of visitors per room
    3.What is the base income per room during a specified period
    4.What is he strongest custoemr base?

    Once these queries are done a report there is a request for a report to be generated which i believe is fairly straight forward with microsoft access by changing the query into a report form



    I would kindly request assistance with how I can create the queries for these questions.

    My experience thus far is very limited software skill when it comes to Microsoft access.

    I just purchased microsoft access 2010 and have started to use library and microsoft tutorial resources however I find myself struggling to translate that information into a query design that can answer these questions.

    what i know thus far is to use the query tab to start a query however i admittedly am at a loss as to how to write the formula

    My first effort is something like this for

    question 1. add room field, add field for difference between arrival and departure date= number of days per room, add field for average days per room ( number of days per room divided by number of stays)
    question 2. add room type field, add no of guests field, add number of stays per room field= (?), add average number of visitors per room type field =(number of guests divided by number of stays)
    question 3.add room field, add length of visit field =( difference between arrival and departure date),add daily rate field , add base income field =( length of visit muliply by daily rate)Note room rates are same for 1 to 4 guests 5th and 6th guest pay additional $20 per day, 7 day stay or moe receives 10% discount ** I ma completely uncertain how to incorporate this info into the query and how the formaul/parameter would look
    question4.add number of guests field, add avg length of stay field, query formula would try to look at which size of guest party spends the most money at the hotel is it the 1 guest, 2 guest 3 guest, 4 guest or 4+ guest party

    I would certainly appreciate any help that can focus my limited knowledge and experience into answering these questions
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    The project you posted does not include any effort at attempting solutions. It is just the raw table. Attempt solutions and post your efforts for analysis.

    Use queries to manipulate data. Also build report using Grouping & Sorting with aggregate calcs to manipulate data.

    Learn date manipulation functions. You can simply subtract one date from another to return difference in days as day is the default unit. Use DateDiff to get difference in other time units. Note that a dep and arr of same day will result in 0 - not 1 day. But since you are actually counting nights of stay, this should work fine. Dep and Arr should never be same day (unless you rent by the hour).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. dlookup assistance
    By underscore in forum Access
    Replies: 4
    Last Post: 12-28-2011, 06:32 AM
  2. Assistance in form/query
    By abodi in forum Forms
    Replies: 1
    Last Post: 09-19-2011, 03:30 AM
  3. Requesting Materials Report Assistance
    By pkott in forum Reports
    Replies: 2
    Last Post: 10-21-2010, 08:49 AM
  4. Need Assistance with Forms
    By JDA2005 in forum Forms
    Replies: 5
    Last Post: 06-30-2009, 03:37 PM
  5. Query Assistance Needed
    By elotromanuel in forum Queries
    Replies: 1
    Last Post: 03-17-2009, 09:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums