Resolved!!!
Well... I finally resolved this issue. It required a complete rewrite. I have Access 2003 at home (only 2000 here at work) and in the 2003 help files I found a reference to writing a union query. This query did all the date combining.
Thank you for your help!
Matt
I wrote a seperate expression for the date comparison calling it [MonthFilter]. Then changed the three instances of [LeaveDate By Month] to [MonthFilter]. I got the same results as before where it just brought up a dialog box in datasheet view asking for the value of [MonthFilter]
Matt
What I would like to try is to leave the whole query grouped under the [LeaveDate By Month], but where it's used as a comparison in the subquery, use the actual date field formatted as mmmm yyyy. I'm just not sure of the syntax... punctuation and all.
Matt
I changed the [LeaveDate By Month] to [LeaveDateByMonth] then to [Date By Month] just for the fun of it, but when I went to the datasheet, it just brought up the 'Enter parameter' dialog box. I made sure that it was changed everywhere in the query.
Matt
Here is the full SQL:
SELECT DISTINCTROW Format$([VacationTable].[LeaveDate],'mmmm yyyy') AS [LeaveDate By Month], CertificationRoster.NameLast, CertificationRoster.NameFirst, CertificationRoster.Crew, (SELECT SUM([Hours1])FROM[OTHours1] WHERE...
I figured maybe there was a problem with my AND statement, incorrect punctuation or something so I kept the whole statement intact and just changed the date value comparison:
From:
(SELECT SUM([Hours1])FROM[OTHours1] WHERE [OTHours1].[CoveringName1]=[CertificationRoster].[NameLast] AND...
No, just trying to do some summing and grouping of various values for the "Overtime Tracking" report.
My latest test, I took out the name portion of the subquery, and changed the date part to:
[OTHours1].[LeaveDate By Month] = "March 2007"
And it returned the result that it should have.
This...
I believe you are referring to the [LeaveDate By Month] without a specifying table or query. But that is the [LeaveDate By Month] from THIS query that the originating query is supposed to compare to.
(If that makes any sense) :)
I tried to add the query title to it ---
[OTHours1].[LeaveDate...
Howdy All!
I have a subquery which is supposed to filter overtime hours based on name and date by month. The name is working fine, but it's skipping over the date.
(SELECT SUM([Hours1])FROM[OTHours1] WHERE [OTHours1].[CoveringName1]=[CertificationRoster].[NameLast] AND [OTHours1].[LeaveDate...