T
That Crazy Hockey Dood
Good Afternoon..
I was assisted with writing a query by someone in these forums a year or so
ago. However, something recently happened that caused for question on the
accuracy of the query. Below is the SQL:
SELECT Exception.Date, Exception.[Thru Date], Exception.[Associate Name],
Exception.[Event Type], Exception.FMLA, Exception.Initial, Exception.Note
FROM [Exception]
WHERE (((Nz([Date],#1/1/1900#))>=Nz([Forms]![Report
Generator]![Date],Nz([Date],#1/1/1900#))) AND ((Nz([Thru
Date],#12/31/2099#))<=Nz([Forms]![Report Generator]![Thru
Date],Nz([Date],#12/31/2099#))) AND (([Associate Name] &
"")=Nz([Forms]![Report Generator]![Name],[Associate Name] & "")) AND (([Event
Type] & "")=Nz([Forms]![Report Generator]![Event],[Event Type] & "")) AND
(([FMLA] & "")=Nz([Forms]![Report Generator]![FMLA],[FMLA] & "")));
The query is hitting a table called Exception and pulling back the data
based upon a form that users input one or a combination of Date, Thru Date,
Associate Name, Event Type and FMLA.
Outside of the fact that I committed a sin by using reserved words, why
would I see inaccurate results. For example: I chose for the report to tell
me events between 1/8/2009 and 1/9/2009. The report gives me anything it
matches on for those days. However, an event that started on 1/6/2009
through 1/10/2009 is not reported on.
Any assistance is appreciated.
Thanks,
Jim
I was assisted with writing a query by someone in these forums a year or so
ago. However, something recently happened that caused for question on the
accuracy of the query. Below is the SQL:
SELECT Exception.Date, Exception.[Thru Date], Exception.[Associate Name],
Exception.[Event Type], Exception.FMLA, Exception.Initial, Exception.Note
FROM [Exception]
WHERE (((Nz([Date],#1/1/1900#))>=Nz([Forms]![Report
Generator]![Date],Nz([Date],#1/1/1900#))) AND ((Nz([Thru
Date],#12/31/2099#))<=Nz([Forms]![Report Generator]![Thru
Date],Nz([Date],#12/31/2099#))) AND (([Associate Name] &
"")=Nz([Forms]![Report Generator]![Name],[Associate Name] & "")) AND (([Event
Type] & "")=Nz([Forms]![Report Generator]![Event],[Event Type] & "")) AND
(([FMLA] & "")=Nz([Forms]![Report Generator]![FMLA],[FMLA] & "")));
The query is hitting a table called Exception and pulling back the data
based upon a form that users input one or a combination of Date, Thru Date,
Associate Name, Event Type and FMLA.
Outside of the fact that I committed a sin by using reserved words, why
would I see inaccurate results. For example: I chose for the report to tell
me events between 1/8/2009 and 1/9/2009. The report gives me anything it
matches on for those days. However, an event that started on 1/6/2009
through 1/10/2009 is not reported on.
Any assistance is appreciated.
Thanks,
Jim