Results 1 to 3 of 3
  1. #1
    jonathanjilla is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    5

    Complicated Query - combine two records into one record (kind of)

    Hi All,

    I'm not really an access expert, just figured it out as I needed to. I have googled and searched every forum possible for an answer for my current problem but have had no luck. I'd appreciate any and all help from you folks.

    Here's the situation... I have an inventory management system for a small chain of gas stations (There are three types/grades of gasoline - they are 87,89,91 - which are tracked separately).
    1. I enter how much gas we sold of each grade every day.
    2. I also enter inventory readings taken at the end of the day for each grade.
    3. I also enter any gasoline delivery we receive.

    I need a report at the end of the month for each grade showing if there is any shortage or overage in gasoline (due to theft, leaks and so on...). My query linked to the report ALMOST gives me everything I need except for one small problem!

    If I have two deliveries on the same day, the day shows up twice on my report and messes it up!! I need the query to add the two delivery quantities and show the total delivery for that day on the report. I have tried everything I can think of and had no luck.

    You can run the report titled "123" and see what I mean.
    the start day is "9/1/12", end day is "9/30/12" and station is "2".
    the problem arises on 9/13/12 when we have two deliveries.

    sample.mdb

    Thanks again for you time people

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Could try using report Grouping & Sorting with aggregate calcs. Otherwise, base the report on an aggregate (Group By) query.
    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.

  3. #3
    jonathanjilla is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    5
    I made a Group By query and summed it. Thanks!

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

Similar Threads

  1. Some kind of lookup query
    By borge in forum Queries
    Replies: 1
    Last Post: 10-16-2011, 03:13 PM
  2. Replies: 2
    Last Post: 08-17-2011, 03:02 AM
  3. Combine master detail records in one query
    By mariost in forum Queries
    Replies: 4
    Last Post: 05-14-2011, 11:25 AM
  4. Replies: 8
    Last Post: 01-21-2011, 10:28 AM
  5. What kind of query do I need?
    By cowboy in forum Queries
    Replies: 1
    Last Post: 02-17-2010, 04:09 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