|
Thread: Sum
-
Jul 1st, 2008, 01:06 AM
#1
Thread Starter
New Member
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
-
Jul 1st, 2008, 03:25 AM
#2
Hyperactive Member
Re: Sum
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|