Results 1 to 2 of 2
  1. #1
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875

    Multiple Query Results Sorted Together

    I work at a manufacturing facility where we cut glass for vehicle/trailer windows, etc. Our scheduling and invoicing system was built completely in-house from Access 2000 and is composed of a backend database that holds all the data and a Form/Report based frontend that employees use to access that data.

    One of our customers sends us a weekly "Open Orders" report. This report lists all the items that they've ordered from us but have not received yet.

    I'm trying to make a report that will do 3 things.
    1. List all shipments we've made against each line on their PO
    2. For items that took more than 1 shipment, show a "Total" line.
    3. List items that have NO shipments against them.

    Because of the way our database is set up, I'd need to use essentially two Queries (1 for lines that have shipments and another for lines that don't have any).

    The problem is that I'd like to sort all these items together in the same list so that it looks something like this:

    Code:
    PO: <PO Number>
    SO: <Our internally assigned tracking number>
    
      <Line 1> <Glass Type> <Glass Size> <Order Qty.> <Date Due>
        <Shipment 1> <Qty. Shipped> <% Shipped> <Invoice #> <Date Shipped>
        <Shipment 2> <Qty. Shipped> <% Shipped> <Invoice #> <Date Shipped>
        Total:       <Qty. Shipped> <% Shipped>
     
      <Line 2> <Glass Type> <Glass Size> <Order Qty.>  <Date Due>
        No Shipments
    
    . . .
    How can I take these two Queries and combine them like that on a single Report?

  2. #2
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875

    More After the Break!

    I've been thinking more about this and, although it would require the report to run the Queries a bunch of times (hammering the backend database). . .

    Could I nest collapsible sub-Reports in the following manner?:

    Report 1
    Code:
    PO: <PO Number>
    SO: <Our internally assigned tracking number>
    
      <Line 1> <Glass Type> <Glass Size> <Order Qty.> <Date Due>
        <Report 2>
    
      <Line 1> <Glass Type> <Glass Size> <Order Qty.> <Date Due>
        <Report 2>
    
    . . .
    Where the second Report looks either like this:
    Code:
    <Shipment 1> <Qty. Shipped> <% Shipped> <Invoice #> <Date Shipped>
    <Shipment 2> <Qty. Shipped> <% Shipped> <Invoice #> <Date Shipped>
    Total:       <Qty. Shipped> <% Shipped>
    Or like this:
    Code:
    No Shipments
    And if that's so, how do I use sub-Reports (I'm a total newcomer to Reports in Access 2000)?

    If you need Table information, assume I'm using the following 4 Tables:
    SOMaster
    -so_num - the internal tracking number
    -po_num - the PO number the customer uses
    -cust_id - the customer's internal ID number (for billing)
    -ship_id - the shipping location's internal ID number

    SODetail
    -so_num - the internal tracking number of the item
    -line_num - the line number of the item
    -glass_type - the type of glass wanted (thickness, reflective, etc.)
    -height - the height of the glass
    -width - the width of the glass
    -shape_id - the shape ID number of the glass (specifying radiused corners, angles, etc.)
    -ord_qty - quantity ordered
    -last_sched_qty - last quantity scheduled on the item
    -tot_sched_qty - total quantity scheduled of the item (if we break some and have to schedule more)
    -ship_qty - total quantity shipped
    -due_date - when the item is needed by the customer

    InvoiceMaster
    -inv_num - the invoice number
    -cust_id - the customer's internal ID number (for billing)
    -ship_id - the shipping location's internal ID number
    -date - the date of the invoice

    InvoiceDetail
    -inv_num - invoice number
    -inv_line_num - the invoice's line number
    -so_num - internal tracking number being invoiced on that line
    -po_num - customer's PO being invoiced on that line
    -inv_qty - quantity being invoiced
    -price - the price of the glass being invoiced

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

Similar Threads

  1. Weird Query results
    By UCBFireCenter in forum Queries
    Replies: 0
    Last Post: 10-06-2009, 03:38 PM
  2. display query results in a form
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 08-14-2009, 03:02 PM
  3. Replies: 0
    Last Post: 07-19-2009, 12:19 PM
  4. Combine Query Results to One Table
    By pr4t3ek in forum Queries
    Replies: 0
    Last Post: 12-19-2008, 06:37 AM
  5. Entering query results in a form
    By marcello.dolcini in forum Forms
    Replies: 0
    Last Post: 04-15-2007, 06:01 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