Results 1 to 4 of 4
  1. #1
    rajdh75 is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Jun 2020
    Posts
    2

    Post Cash Total and Credit Total in separate columns

    Hello,
    I have made a query from 3 tables.
    It has Date of sale, Invoice ID, Customer ID, Type of Sale and Sum of Total columns.
    sum of total is arrive from Group By sum method.
    I want separate Cash column which will have Cash Total and separate Credit column which will have Credit Total.
    From this



    Date of sale InvoiceID CustomerID TypeofSale SumofTotal
    30/04/2020 1 1 Cash 0.00
    30/04/2020 2 7 Credit 300.00

    Like this -

    Date of sale InvoiceID CustomerID Cash Credit
    30/04/2020 1 1 300.00 0.00
    30/04/2020 2 7 0.00 300.00

    How can i achieve this ?

    Thanks.
    Attached Files Attached Files

  2. #2
    kd2017 is offline Well, I tried at least.
    Windows 10 Access 2016
    Join Date
    Jul 2017
    Posts
    1,142
    Look into crosstab queries.
    https://support.microsoft.com/en-us/...0-2cd8484667e8

    See attached db.
    Attached Files Attached Files

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Another option, a query field like:

    Cash: IIf(TypeOfSale = "Cash", AmountField, 0)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    rajdh75 is offline Novice
    Windows 7 32bit Access 2013 32bit
    Join Date
    Jun 2020
    Posts
    2
    Thanks kd2017 for your solution.

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

Similar Threads

  1. Replies: 8
    Last Post: 12-24-2019, 10:46 AM
  2. Separate Column for Category Total
    By Bigd_NC in forum Queries
    Replies: 2
    Last Post: 08-12-2019, 11:11 AM
  3. Replies: 1
    Last Post: 08-12-2017, 03:09 AM
  4. How to subtract two columns and get total in report view
    By newuserthatneedsassistanc in forum Reports
    Replies: 6
    Last Post: 07-28-2017, 03:52 PM
  5. Replies: 4
    Last Post: 06-07-2014, 01:54 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