Sorry to butt in but a number of things caught my eye here;
Why are you using curly braces ({) round {SALES.DATE} not square brackets [SALES.DATE] ? If it's because CR (Crystal Reports?) requires it, then my apologies because I don't do CR.
DATE is a reserved word and I would not use it as a field name because strange thing happen. . .
"MMMM" will return 'January' in US/UK keyboard/regional settings but 'janv' if in French. As I detect that English may not be your first language, are your regional settings causing the problem?
Veena has moved you on by using the Month() and Year() functions which should return numbers, so the above should not now be causing a problem but when I am faced with problems like this I find it useful to add a temporary command button to pop a message box to display the criteria (I've never mastered the Debug Window!) e.g. something like
- MsgBox Month ({SALES.DATE}) & " - " & Val(cboMonth.Text)
-
' and
-
MsgBox Year ({SALES.DATE}) & " - " & Val(cboYear.Text)
Although I don't think that will work because of the curly braces and you may have to do a DLookup() to find a particular SALES.DATE to display
- MsgBox Month (DLookUp("[DATE]", "SALES", "A Criteria ") & " - " & Val(cboMonth.Text)
If you don't put a criteria in the DLookUp I believe that you just return data from the first record, which might be OK just to check the formatting of the data.
Hope this has been some help.
S7