John
Sorry for the missing info.
Calmonth is a number(integer).
The format in which the data is stored is 2004012 , 2004009,etc
Thanks
Karen
I'm still wondering... WHY. Access provides a very flexible Date/Time
datatype field. True, a Date/Time must be an exact date, not an entire
month; but you could store data for this December in a field with a
date of 12/1/2004, and use a Format property like "yyyy\0mm" to
regenerate your current date format if you wish. (Why the middle zero
is another question...)
My suggestions should be adaptable to Calmonth being an integer. Just
use it in the second (month) argument of DateSerial. You'll still need
to somehow get the year from the user, or write some code to read the
user's mind and determine whether they want this year-to-date or last
year total, should they run the query a week from now.
John W. Vinson[MVP]