"List of products bought by customer between dates&quot

boby
boby Member Posts: 78
Hello,
For statistics purpose, I create a table with datas from an old accountancy program. I'm asked to do a form (not a report) to list the products a customer bought from a certain date.

The table looks like "sales line" and is made of line combining customer code and product code (a line by product sold to this customer in an invoice), and the form have to list subtotals by product..

In fact, I really don't know how to list that way (the "distinct" clause in SQL). Thanks for your suggestions or tips :)

Comments

  • Shenpen
    Shenpen Member Posts: 386
    This is close to impossible. I'd suggest to convice the customer to have a report, or an Excel query tru ODBC.

    Do It Yourself is they key. Standard code might work - your code surely works.
  • fb
    fb Member Posts: 246
    Ah, the magic of FlowFields:

    You have a Customer/Product Details table. You need another table, let's call it "Customer/Product Summary", with the following fields:

    -- Customer No.
    -- Product No.
    -- Date Filter (FlowFilter field)
    -- Total Qty (Flowfield Sum of Quantity field in Details table)
    -- Total Amount (Flowfield Sum of Amount field in Details table)

    Populate this table with the unique combinations of Customer/Product, and there you have it...
  • boby
    boby Member Posts: 78
    Thank you very much for your answers!!
    Always good tips!!