Okay so I have two tables tblExpenses and tblExpenseDetails (1-to-Many). tblExpenses has ProjectID and ExpenseType. There are 3 different types of Expenses (Purchase, Travel, Contract).
I would like to have a query that totals the Expense Details by Project and Expense Type. ie, each project will have 3 records in the query.
Sample Data: Pre-Query
Sample Data: Post-Query
I also have to do taxes and such, but I'm pretty sure that if I get this, I'm pretty sure I can figure out the rest.
-------------------------
Just call me Captain Awesome.
I would like to have a query that totals the Expense Details by Project and Expense Type. ie, each project will have 3 records in the query.
Sample Data: Pre-Query
Code:
tblExpenses
ExpenseID ProjectID ExpenseType
1 1 Purchase
2 2 Travel
3 1 Contract
4 1 Purchase
tblExpenseDetails
ID UnitPrice #ofUnits ExpenseID
1 $2 5 1
2 $5 6 1
3 $7 2 2
4 $2 9 2
5 $3 6 3
6 $9 1 3
7 $1 9 4
8 $5 5 4
Sample Data: Post-Query
Code:
ProjectID ExpenseType Total
1 Purchase $74
1 Contract $27
2 Travel $32
I also have to do taxes and such, but I'm pretty sure that if I get this, I'm pretty sure I can figure out the rest.
-------------------------
Just call me Captain Awesome.