W
Wylie C
I have an unbound calculated control that gets a summed value from a query.
When the user uses the form to edit data, I would like the data to refelect
the totals for the current year shown on the forms. The control on the form
storing the date is StatDate and the unbound control code is:
=DLookUp("[Total Miles]","Years Mileage")
My query looks like this:
SELECT DISTINCTROW Year([Statistics].[StatDate]) AS [Year],
Sum(Statistics.Mileage) AS [Timed Miles Ridden], Sum(Statistics.[Total
Miles]) AS [All Miles Ridden]
FROM Statistics
GROUP BY Year([Statistics].[StatDate]),
Format$([Statistics].[StatDate],'yyyy')
ORDER BY Year([Statistics].[StatDate]) DESC;
Thank you all very much.
When the user uses the form to edit data, I would like the data to refelect
the totals for the current year shown on the forms. The control on the form
storing the date is StatDate and the unbound control code is:
=DLookUp("[Total Miles]","Years Mileage")
My query looks like this:
SELECT DISTINCTROW Year([Statistics].[StatDate]) AS [Year],
Sum(Statistics.Mileage) AS [Timed Miles Ridden], Sum(Statistics.[Total
Miles]) AS [All Miles Ridden]
FROM Statistics
GROUP BY Year([Statistics].[StatDate]),
Format$([Statistics].[StatDate],'yyyy')
ORDER BY Year([Statistics].[StatDate]) DESC;
Thank you all very much.