Hi,
I just converted my database from Access 2003 to Access 97. Now when I try to
run my query, it comes back with an error, "undefined function 'MonthName' in
expression". I guess Access 97 does not use "MonthName" function. I need to
rewrite the expression in my query, but Im not sure how to replace the
MonthName function. This is my expression in my query:
Month of Last Contact: MonthName(DatePart("m",Last(Nz([DateSent],[InspDate])))
)
Can someone help me change this expression?
Thanks,
Thomas
OfficeDev18 - 30 Nov 2005 22:36 GMT
Change it to:
Month of Last Contact: Format(DatePart("m",Last(Nz([DateSent],[InspDate]))),
"mmmm")
See the Format() function in the Help for details and be sure to study the
examples. Incidentally, beware: the result is a string, not a date!
HTH
>Hi,
>I just converted my database from Access 2003 to Access 97. Now when I try to
[quoted text clipped - 11 lines]
>
>Thomas

Signature
Sam
John Spencer - 01 Dec 2005 00:14 GMT
Format(Last(NZ(DateSent,InspDate)),"mmmm")
You can use "mmm" to get the abbreviated month name.
> Hi,
> I just converted my database from Access 2003 to Access 97. Now when I try to
[quoted text clipped - 11 lines]
>
> Thomas
ThomasK - 01 Dec 2005 14:12 GMT
John,
I used your code and it worked great, Thank you.
Thomas
>Format(Last(NZ(DateSent,InspDate)),"mmmm")
>
[quoted text clipped - 5 lines]
>>
>> Thomas