Results 1 to 5 of 5

Thread: How to show an extra column in datagrid which should show the balance amount?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2014
    Posts
    348

    How to show an extra column in datagrid which should show the balance amount?

    Hi,

    The following code extracts the Invoice Total & Payment Received for a particular Customer. I also want to show the Balance Amount column at the end of the datagridview without adding any extra field to my MS Access Database 2013.

    Code:
    "Select  TransactionDate, TransactionType, TransactionNumber, CustomerNumber, CustomerName, Sum(InvoiceTotal) AS InvoiceTotal,  PaymentReceived from TransactionsTable Where [CustomerNumber] LIKE '" & txtSearchCustomerNumber.Text & "' Group By TransactionDate, TransactionType, TransactionNumber, CustomerNumber, CustomerName, PaymentReceived Order By CustomerNumber ASC"
    Please let me know how to modify the above code to achieve this task.
    Attached Images Attached Images  

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2014
    Posts
    348

    Re: How to show an extra column in datagrid which should show the balance amount?

    The Balance Amount column which I need is as in the picture.
    Attached Images Attached Images  

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2014
    Posts
    348

    Re: How to show an extra column in datagrid which should show the balance amount?

    I want to know whether it is possible to do so or not. Please reply.

  4. #4
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,971

    Re: How to show an extra column in datagrid which should show the balance amount?

    In MS Access?
    Not that i know of.

    Except Jet-SQL understands the SUM OVER-Function (I'm not talking about pure SUM-Function!!!)
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2014
    Posts
    348

    Re: How to show an extra column in datagrid which should show the balance amount?

    Okay. Thanks for your kind reply.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width