Need a sales receipt (report) from MS Access 2007 with multiple items and multiple payments.

Posted on 2011-05-01
Last Modified: 2012-05-11
I have a MS Access database in 2007 that controls inventory, clients, and sales.  I need to be able to print a sales receipt (report) for a sale that contains multiple items and multiple payments.  I have the following tables: Inventory, Clients, Sales, SalesItem, Payments.  The sale table contains basic sale information and is linked to both the SalesItem table and Payment table.  I have a report based on query, but my problem is that I'm not sure how to get the report to populate correctly for an sale with multiple items and multiple payments.  I can get the report to detail the items of a sale and a sum of payments, but I can't get a detail or both.
Question by:rdani07
    LVL 20

    Accepted Solution

    Create a header/detail/footer report based on a query of
    Clients < Sales < SaleItems > Inventory.

    This is justlike a standard invoice, with Client and Sale information in the header, SalesItem info in the detail, and a total in the footer.

    Then, in the footer, add a subreport based on Payments, linked to the main report on SaleID.  The subreport lists the dates and amounts of the payments, with a total in a textbox in the subreport footer (which can be hidden if you prefer).

    Then, the balance owing can be calculated on the main report like this:
    =txtSaleTotal - Nz( [sbrPayments].[Report]![txtPaymentsTotal], 0 )

    Graham Mandeno [Access MVP]
    LVL 12

    Expert Comment

    Well depending if you want to have an overview of the Sales vs Payments of a Client.
    Do you want this like a summary level of all Sales vs Payments or inlcuding OrderID, to see for each SalesTotal the PaymentTotal?

    Seperate Query1;
    ClientID, SalesID, SumSales

    Seperate Query2, linked to SalesID;
    ClientID, SalesID, SumPayment

    I wiould create a Query3, linked on a LEFT JOIN with Query 1, Query 2, with having;
    ClientID, ClientName, SalesID, SumSales, SumPayment

    You can create a Report with as Header Seaction the ClientID and Client Name, in the Details section you will place the SalesID with SalesTotal, SumPayment, then in the Footer Section the Grand Total Calculations.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now