[ol][li]Recommendation: Change the name of the column named Date to something else. It is bad procedure to use a reserved word as a column name.
[li]When you create the query in query designer, you'll select MAX in one column and Where in another column and use [Date] as the field name in both.
[tt]
Field: MaxDate: Max([Date]) [Date]
Table: tblData
Sort:
Show: <checked> <not checked>
Criteria: Between [Start Date] And [End Date][/tt]
[li]Do you want to use the range of dates from one table to get the Max date within the range from the other table? Or will the user be entering the parameters? If you use a table to match, do you want to return a match for every range in the range table or just one value?
Example: Return max date for each range in range table
SELECT Max(tblData.[Date]) AS MaxDate,
tblDates.[Start Date], tblDates.[End Date]
FROM tblData, tblDates
WHERE (((tblData.[Date]) Between tblDates.[Start Date] And tblDates.[End Date]))
GROUP BY tblDates.[Start Date], tblDates.[End Date];[/ol] Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.