Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Mar 2002
    Edinburgh, Scotland
    Thanked 0 Times in 0 Posts

    Summing within date parameters (Access 97)

    Hi, haven't a scooby what to do with this one. I have a database which I have recently set up to calculate the package price for a holiday with flights leaving on one date and returning on another, dependant upon hotel prices for adults/children etc. This is done entirely on calculated form objects accessing data in combo boxes.

    The users like this, and the problem is they now want a report which will select the best combination of hotel price/flight price for a certain hotel/departure/arrival airport between selected dates, with a flexible duration of between 1-14 days. I have a query which shows the total hotel cost for the number of adult/children for each individual date between the date parameters (possible depart dates v. possible return dates matching the duration). I also have another query which takes the same date parameters and shows where there are corresponding out and return flights, and how much the total cost of flights would be.

    What I need to do is somehow sum the total hotel price between potential departure/return dates in the second query...... anybody done anything like this before??? <img src=/S/nosleep.gif border=0 alt=nosleep width=27 height=15>

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Evergreen, CO, USA
    Thanked 65 Times in 64 Posts

    Re: Summing within date parameters (Access 97)

    It sounds like a GroupBy query using the query that displays the individual records as its data source would do the trick. Are you familiar with the Totals menu under View? It will let you GroupBy, Sum or Count and various other functions. If you need to display the data on a form, you could use the DSum function, assuming you are displaying all of the selected dates in a continuous form.

Posting Permissions

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