Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / May 2006

Tip: Looking for answers? Try searching our database.

How do I create a query against a person and total up the expenses for each person`

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
effendi@epitome.com.sg - 14 May 2006 10:15 GMT
I have a table containing persons and another which has personexpense.
I would like to create a query which does a total for expenses for each
person. How can I do this?

Thanks
John Spencer - 14 May 2006 14:19 GMT
Make a select query with the two tables joined on the person id.

Select View: Totals from the menu

Change group by under the ExpenseCost field to Sum.

In SQL statement that would be something like

SELECT Persons.PersonName, SUM(PersonExpense.Cost) as TotalExpenses
FROM Persons Inner JOIN PersonExpense
ON Persons.PersonID = PersonExpense.PersonID
GROUP BY Persons.PersonName

Insert your field and table names.

> I have a table containing persons and another which has personexpense.
> I would like to create a query which does a total for expenses for each
> person. How can I do this?
>
> Thanks
effendi@epitome.com.sg - 14 May 2006 17:22 GMT
Thanks, I'll give it a go.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.