Results 1 to 4 of 4
  1. #1
    Bagels is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2023
    Posts
    22

    Report that pulls from 2 different queries

    You all have helped me before...i'm struggling with this one.

    I have a database that tracks customer returns/RMA's. I have a query that pulls all relevant return information based on the user's selection of customer and date range. It works fine. The report thats based on it also works fine.

    I'm pulling in the shipping information from an external source, it's a make table query , it also works fine. I have a similar form that based on the user's selection and date range will display the total amount of parts shipped to that customer for that time frame.



    What i'm trying to do is basically combine the two, so that I can say "there were 10 returns/failures for this customer over this time frame, and we shipped 5,000 parts to them during the same time" . So that I can calculate a PPM . But it's basically 2 queries, how can I have the date criteria apply to both queries at the same time, if that makes any sense at all.

  2. #2
    Salty Mariner is offline Intermediate
    Windows 11 Access 2021
    Join Date
    Dec 2023
    Location
    Corpus Christi, TX
    Posts
    69
    Make a third query that combines the result of the two previous queries.

    Do you have a common field that you can create a join on?

    You need something to create a logical join on so the queries can relate. Customer Name perhaps? If it's external you might need to do something in a query with formulas to assure that you have the Customer Name spelled correctly so the join works. Or perhaps an order number. Your biggest hurdle will likely be creating a reliable logical join and because the shipping information is external you have no control over that data.

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    My interpretation of the requirement is a main form with customer details and a subform with returns. The subform might have 2 textboxes formatted as date data so that the built in calendar would pop up. One would be the From and the other the To date. Maybe that's not about what is being asked.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    orange's Avatar
    orange is online now Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Show the SQL of the working queries or a copy of the database with instructions.

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

Similar Threads

  1. Replies: 6
    Last Post: 08-24-2018, 04:52 PM
  2. Query pulls duplicates
    By TazoTazmaniac in forum Queries
    Replies: 7
    Last Post: 02-19-2015, 03:56 AM
  3. Replies: 2
    Last Post: 10-23-2014, 12:10 PM
  4. Replies: 5
    Last Post: 11-26-2012, 03:12 PM
  5. Report that Pulls from two Forms - Lending Library
    By Surferboy1500 in forum Access
    Replies: 8
    Last Post: 06-07-2011, 12:13 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