Question : only show records in one field that are before max field

I created a query based on two tables that show the first and last case for each county and precinct in each county I have one more field that represents the missing cases. The query works fine except I want to refine it so that the missing case field only shows cases upto the max field. I have used <max([processedcases].[case] which works fine unless the precinct doesn't have any missing cases that are before the max of the [processed].[case] field. If this instance occurs it doesn't show any cases being collected. My question is how can I have the query only show the min and max in addition to the cases that are missing. If no cases are missing maybe show 0 if this would help, but can be blank I am just trying to get a solution. Thank You in advance.

Answer : only show records in one field that are before max field

Working sample attached, based on snippet shown below
1:
2:
3:
4:
5:
6:
7:
8:
SELECT pc.CaseCounty, pc.CaseYear, pc.MinOfCase, pc.MaxOfCase, pc.CasePrecinct, [Missing Cases].Case
FROM 
(SELECT [Processed Cases].CaseCounty, [Processed Cases].CaseYear, Min([Processed Cases].Case) AS MinOfCase, Max([Processed Cases].Case) AS MaxOfCase, [Processed Cases].CasePrecinct
FROM [Processed Cases]
WHERE [Processed Cases].CaseCounty IN ("gry","tar","col","hay","den")
GROUP BY [Processed Cases].CaseCounty, [Processed Cases].CaseYear, [Processed Cases].CasePrecinct
) AS pc
LEFT JOIN [Missing Cases] ON ((pc.CaseCounty=[Missing Cases].CaseCounty) AND (pc.CasePrecinct=[Missing Cases].CasePrecinct) AND ([Missing Cases].Case<pc.MaxOfCase));
 
 
Random Solutions  
 
programming4us programming4us