Results 1 to 12 of 12
  1. #1
    naks is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    13

    Calculate Debit and Credit


    Hi.
    I Am new here. can anyone help me out ?

    I have debit & credit column. Which I use this in the report --> =IIf([PaymentMet_trans]=2,"",[Amount])
    debit = 1 , credit = 2

    Now, i would like to have the total sum of it. according to the debit & credit separately instead of the whole total sum.

  2. #2
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180
    Add a Group on the Report based on PaymentMet_trans then in the Header or Footer add the Totals.

    Click image for larger version. 

Name:	Grouping & Totals.png 
Views:	29 
Size:	7.6 KB 
ID:	12232

    Click image for larger version. 

Name:	Group, Sort, and Total.png 
Views:	9 
Size:	7.4 KB 
ID:	12233

    =Sum(PaymentMet_trans)

    You can find a FREE Tip at http://599cd.com/tips/access/report-sorting-grouping/


    Or you could use a DSUM.
    =DSUM("PaymentMet_trans", "tablename", [PaymentMet_trans]=1)
    =DSUM("PaymentMet_trans", "tablename", [PaymentMet_trans]=2)

    etc


    Alex Hedley
    TechHelp Team Leader
    599CD.com

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Cross Posting: http://www.access-programmers.co.uk/...d.php?t=246426

    IMHO Cross-posting on different forums without notification is not a good idea.

    Read this: http://www.excelguru.ca/content.php?...-cross-posters
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    naks is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    13
    AlexHedley,

    It doesn't seem to work. i have #error on the report D:

  5. #5
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Calculate Debit and Credit

    Which one did you try?

    If you tried the second one did you replace "tablename" with the name of your table

  6. #6
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

  7. #7
    naks is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    13
    well. err sorry if i was cross-posting :x i am a newbie.

    i tried the second one, changed the tablename. didnt work too

  8. #8
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180
    Is [PaymentMet_trans] of type Number?

  9. #9
    naks is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    13
    AlexHedley, i just checked. it's short text actually. so if i change this to number, it will work ? let me have a go

  10. #10
    naks is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    13
    Btw, PaymentMet_trans is an option button.

    IF debit is clicked. '1' will be stored inside the PaymenMet_trans, else it will be '2' if credit is clicked.

    So, In my report.

    I used this to actually list out the debit amount :
    =IIf([PaymentMet_trans]=2,"",[Amount])

    Click image for larger version. 

Name:	report sample.jpg 
Views:	8 
Size:	142.0 KB 
ID:	12256

  11. #11
    naks is offline Novice
    Windows 8 Access 2013
    Join Date
    May 2013
    Posts
    13
    I got it solved. I tried doing what you asked me to do. thanks

  12. #12
    AlexHedley's Avatar
    AlexHedley is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    England
    Posts
    180

    Calculate Debit and Credit

    Glad you got it working

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

Similar Threads

  1. Replies: 5
    Last Post: 01-05-2013, 04:53 PM
  2. Replies: 10
    Last Post: 08-25-2012, 03:25 PM
  3. running sum for debit-credit in subform
    By roshanzarmal in forum Queries
    Replies: 1
    Last Post: 09-29-2011, 09:37 PM
  4. Replies: 2
    Last Post: 08-24-2011, 12:59 PM
  5. Credit Card Info, Where?
    By mastromb in forum Access
    Replies: 3
    Last Post: 05-26-2010, 12:37 AM

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