Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / December 2005

Tip: Looking for answers? Try searching our database.

Using MonthName function in 97

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ThomasK - 30 Nov 2005 21:24 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.