Well Hello everyone, I'm not too sure what this is called and therefor no search results are even helping me.
What im trying to do is, pull up 3 tables, and pull generic fields...
So Right now this is where im at
Code:
SELECT Clients.ClientName, Contract.ClientCodeName, Contract.ClientCodeYear, Contract.SignedDate, Contract.ContractTotalHours, Contract.TermInMonth, Sum(Invoices.UsedHours) AS SumOfUsedHours, Sum(Invoices.UsedHours) AS u2
FROM (Clients INNER JOIN Contract ON Clients.[ID] = Contract.[ClientID]) INNER JOIN Invoices ON Contract.ID = Invoices.ContractID
GROUP BY Clients.ClientName, Contract.ClientCodeName, Contract.ClientCodeYear, Contract.SignedDate, Contract.ContractTotalHours, Contract.TermInMonth, Contract.Active, Clients.Company
HAVING (((Contract.Active)=True) AND ((Clients.Company)=2))
ORDER BY Clients.ClientName;
Problem:
there are three fields i want to add ([Invoices.UsedHours] based on Invoices.InvDate (this month, last month, and month before). this would give me the used hours for a 3 month period.
Some help would be awesome!