Results 1 to 2 of 2

Thread: Sum

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2008
    Posts
    8

    Sum

    Hi guys,

    Can anyone help me out. I have two table in MSACess (tbl_pesoactivity & tbl_expense). In my tbl_pesoactivity fields are(Acode, Totbudget,Frelease,Srelease,totexpense). In my tbl_expense fields are(Acode, Vno,particular,amount). I also created relationship with this two tables.

    What I'd like to do is to sum all the expenses according to Acode and reflect it in tbl_pesoactivity table.

    Thanks in advance

  2. #2
    Hyperactive Member
    Join Date
    Aug 2007
    Posts
    269

    Re: Sum

    Quote Originally Posted by bong_mendoza
    Hi guys,

    Can anyone help me out. I have two table in MSACess (tbl_pesoactivity & tbl_expense). In my tbl_pesoactivity fields are(Acode, Totbudget,Frelease,Srelease,totexpense). In my tbl_expense fields are(Acode, Vno,particular,amount). I also created relationship with this two tables.

    What I'd like to do is to sum all the expenses according to Acode and reflect it in tbl_pesoactivity table.

    Thanks in advance
    You wouldn't neccessarily perform this in VB, I would perform this in my SQL statement. The following (sql server, not sure about Access should be same??) select will sum the totExpense column for each ACode.

    Code:
    SELECT SUM(totexpense), Acode  
    FROM tbl_pesoactivity 
    GROUP BY Acode

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