From: JoeM on
When I am running a query in MSAccess 2007 I get 1315 records, when I run the
query via Excel 2007 connecting to the DB it stops at 691 records. I'm a
little rusty, this is my only query where in the criteria I have an "or". I
was thinking if this had anything to do with a second pass or am I just not
calling it correctly:

SELECT [dbo_Appeal].[Record Number],
[dbo_Appeal].[Type of Case],
[dbo_Appeal].[Appellant Type],
[dbo_Appeal].[Appeal or Grievance],
[dbo_Appeal].DateRecvd,
[dbo_Appeal].DateClosedEH,
[dbo_Appeal].GrievanceReasonID,
[dbo_Appeal].[Case Owner],
[dbo_Appeal].DenialReasonID,
[dbo_Appeal].Region,
[DateClosedEH]-[DateRecvd] AS TAT
FROM [dbo_Appeal]
GROUP BY [dbo_Appeal].[Record Number],
[dbo_Appeal].[Type of Case],
[dbo_Appeal].[Appellant Type],
[dbo_Appeal].[Appeal or Grievance],
[dbo_Appeal].DateRecvd,
[dbo_Appeal].DateClosedEH,
[dbo_Appeal].GrievanceReasonID,
[dbo_Appeal].[Case Owner],
[dbo_Appeal].DenialReasonID,
[dbo_Appeal].Region
HAVING ((([dbo_Appeal].[Type of Case])="Expedited"
Or ([dbo_Appeal].[Type of Case])="Fast Track"
Or ([dbo_Appeal].[Type of Case])="Standard Pre-Service")
AND (([dbo_Appeal].[Appeal or Grievance])="Appeal")
AND (([dbo_Appeal].DateRecvd)>#1/1/2009#)
AND (([dbo_Appeal].DateClosedEH) Is Not Null))
OR ((([dbo_Appeal].[Type of Case])<>"Part D Standard"
And ([dbo_Appeal].[Type of Case])<>"Part D Expedited")
AND (([dbo_Appeal].[Appellant Type]) Like "Member" & "*")
AND (([dbo_Appeal].[Appeal or Grievance])="Appeal")
AND (([dbo_Appeal].DateRecvd)>#1/1/2009#) AND (([dbo_Appeal].DateClosedEH)
Is Not Null));

Joe