I
imstuck via AccessMonster.com
i have this code on my subform's records source:
SELECT [Training Sessions].TSID, [Training Sessions].ModuleName, [Training
Sessions].SessionDate, [Training Sessions].SessionTimeFrom, [Training
Sessions].SessionTimeTo, [Training Sessions].SessionVenue, [Training Sessions]
.InstructorID, Count([Training Records].TraineeID) AS CountOfTraineeID, Abs
(Sum(NoShow)) AS CountNoShow, Instructors.LastName, Instructors.FirstName
FROM (Instructors INNER JOIN [Training Sessions] ON Instructors.InstructorID
= [Training Sessions].InstructorID) INNER JOIN [Training Records] ON
[Training Sessions].TSID = [Training Records].TSID
WHERE ((([Training Sessions].SessionDate) Between DateSerial(Year(Date()),
Month(Date()),1) And Date()))
GROUP BY [Training Sessions].TSID, [Training Sessions].ModuleName, [Training
Sessions].SessionDate, [Training Sessions].SessionTimeFrom, [Training
Sessions].SessionTimeTo, [Training Sessions].SessionVenue, [Training Sessions]
.InstructorID, Instructors.LastName, Instructors.FirstName
ORDER BY [Training Sessions].SessionDate DESC;
I want to display the total NoShow & Attendees (separately) for the current
month using a textbox and will be shown on my main form. It will be something
like a summary.
the name of my subform is: MainFormSubform
i also used this to count the records of the current month: (works fine)
=DCount("TSID","[Training Sessions]","SessionDate between
DateSerial(Year(Date()),Month(Date()),1) And
DateSerial(Year(Date()),Month(Date())+1,0)")
SELECT [Training Sessions].TSID, [Training Sessions].ModuleName, [Training
Sessions].SessionDate, [Training Sessions].SessionTimeFrom, [Training
Sessions].SessionTimeTo, [Training Sessions].SessionVenue, [Training Sessions]
.InstructorID, Count([Training Records].TraineeID) AS CountOfTraineeID, Abs
(Sum(NoShow)) AS CountNoShow, Instructors.LastName, Instructors.FirstName
FROM (Instructors INNER JOIN [Training Sessions] ON Instructors.InstructorID
= [Training Sessions].InstructorID) INNER JOIN [Training Records] ON
[Training Sessions].TSID = [Training Records].TSID
WHERE ((([Training Sessions].SessionDate) Between DateSerial(Year(Date()),
Month(Date()),1) And Date()))
GROUP BY [Training Sessions].TSID, [Training Sessions].ModuleName, [Training
Sessions].SessionDate, [Training Sessions].SessionTimeFrom, [Training
Sessions].SessionTimeTo, [Training Sessions].SessionVenue, [Training Sessions]
.InstructorID, Instructors.LastName, Instructors.FirstName
ORDER BY [Training Sessions].SessionDate DESC;
I want to display the total NoShow & Attendees (separately) for the current
month using a textbox and will be shown on my main form. It will be something
like a summary.
the name of my subform is: MainFormSubform
i also used this to count the records of the current month: (works fine)
=DCount("TSID","[Training Sessions]","SessionDate between
DateSerial(Year(Date()),Month(Date()),1) And
DateSerial(Year(Date()),Month(Date())+1,0)")