Jacob said:
This seems right. However, I may not know how to place this code in. I
have never used the MonthName function. May I ask you how I would place
that in my code? Sorry for such a novice question, I am self taught in
Access and learning every day.
We're always glad to teach. We don't have much information to answer your
question, though. I understand from your posts in this thread that you're
working with a report, and that there is a field named "pmmonth", which is a
month number 1-12. You want to display the (abbreviated) name of the month
on the report instead of the number.
I'm going to guess that you currently have a text box on the report that has
"pmmonth" as its ControlSource property. Quite likely the text box is also
named "pmmonth". We're going to change its ControlSource property, and also
its Name property. Change those properties as follows:
Control Source: =MonthName([pmmonth])
Name: txtPMMonthName
That ought to do it -- you don't have to write any VBA code of your own.
Incidentally, the reason you have to change the name is that it would be
confusing to Access if you had a control named "pmmonth" which wasn't bound
directly to the pmmonth field. There would then be two wholly distinct
things named "pmmonth", and Access would not know which was meant in any
context.
Please let me know if that solves your problem.