I have a database... with 3 tables..
tblEvents
tblPeople
tblPeopleAtEvents
In this database I have a report...
This report displays each person and each event they did...
In the events, i saved a varible called... Detail Hours
I Currently have my adding together total events(without duplicates), using a DCount.... But I can't seem to get my Detail Hours to work... without duplicates... I know I need a query most likely but I have tried a crap ton, with no success... any help?
This is the current code I am using that isn't working(in my query)... Also, I don't know what to use on the form itself... =Sum or DCount or what?....
I was hoping to do a ... Group By DetailEventTitle(to make sure each event is differnt)... then Detail Hours, then in the form do something like Sum(qryDetailHoursTotalDateAndFlight) ... but I can't get that to work... Is there a way to have Detail Hours return a value or something?
tblEvents
tblPeople
tblPeopleAtEvents
In this database I have a report...
This report displays each person and each event they did...
In the events, i saved a varible called... Detail Hours
I Currently have my adding together total events(without duplicates), using a DCount.... But I can't seem to get my Detail Hours to work... without duplicates... I know I need a query most likely but I have tried a crap ton, with no success... any help?
This is the current code I am using that isn't working(in my query)... Also, I don't know what to use on the form itself... =Sum or DCount or what?....
Code:
SELECT tblEvents.DetailEventTitle, Sum(tblEvents.[Detail Hours]) AS [SumOfDetail Hours]
FROM tblPeople INNER JOIN (tblEvents INNER JOIN tblPeopleAtEvents ON tblEvents.EventID=tblPeopleAtEvents.EventID) ON tblPeople.PersonID=tblPeopleAtEvents.PersonID
WHERE (((tblEvents.DetailDate) Between Forms!formMemberReports!FlightFDate And Forms!formMemberReports!FlightEDate) And ((tblPeople.HG_Flight)=Forms!formMemberReports!Combo68))
GROUP BY tblEvents.DetailEventTitle;
I was hoping to do a ... Group By DetailEventTitle(to make sure each event is differnt)... then Detail Hours, then in the form do something like Sum(qryDetailHoursTotalDateAndFlight) ... but I can't get that to work... Is there a way to have Detail Hours return a value or something?