I'm not sure how many version MonthName() has been around. Another alternative is
=DateSerial(Year(Date()),[MonthNumber],1)
You can format this anyway you want.
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
If I use the "MonthName" function in an access 2000 database in a Win 2000 environment it works perfectly, but for those users with Access 2000 in a WinXP environment it fails.
I checked the references on both computers and they are identical. I unchecked the references I could on the broken pc (the one running WinXP), closed VBasic, and then rechecked them again with no success. The "MonthName" function still won't run.
Is there anything else I can check? If not, would it be possible to explain the "DateSerial" function and how to use it to return the string month value from the numerical month value?
This returns a date that is the first day of the month numbered MonthNumber.
=DateSerial(Year(Date()),[MonthNumber],1)
You could set the format of the text box to:
Format: mmmm
Or, you could use:
=Format(DateSerial(Year(Date()),[MonthNumber],1),"mmmm")
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
What I'm wondering is if you could modify this DateSerial function to take the same [MonthNumber] value (in this example, 10 (for October) and return the value "31" (the number of days in the month of October?
Duane
MS Access MVP
[green]Ask a great question, get a great answer.[/green]
[red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
[blue]Ask me about my grandson, get a grand answer.[/blue]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.