
Originally Posted by
pbaldy
Try
SELECT [Table].Name, Max([Table].nShipDate) As MaxDate, Sum([Table].Qty) AS SumOfQty
FROM [Table]
WHERE [Table].nShipDate Between #1/1/2012# And #12/31/2012#
GROUP BY [Table].Name
A WHERE clause is more appropriate than a HAVING clause in this situation (Access often guesses wrong).
Also, note that "Name" is a reserved word in Access - it is a property of many objects - and shouldn't be used for object names. Plus, it is not very descriptive ... "Name" of what?? Your dog, the city,...
You could try putting brackets around it :
Code:
SELECT [Table].[Name], Max([Table].nShipDate) As MaxDate,