Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to show the month in April instead of 04?

Status
Not open for further replies.

sallyGals

Programmer
Feb 1, 2006
35
DE
i had create a table and i add month field in the table.
Now i want the form to show the month in word, eg, April.
But when i set the control source to Month, it will show 04...

Besides, I had try this: =Format([Month],'mmm')
but it show jan , it suppose to be April.

then i also try this,: =MonthName([Month])
but also cannot.

pls help me, thx.
 
Using MonthName(4) will return "April". If your's doesn't, you probably have an issue with something else. Perhaps your control name is the name of a field.

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]
 
I didn't fully understand your question. I'm assuming you're keeping just the number of the month in a field with datatype numeric. You could create an UNbound textbox on your form. Hide your month field. Then on the form's OnCurrent event put:([Text29] is name of textbox)

Private Sub Form_Current()
Me![Text29].Value = Format(DateSerial(1, Me.Month, 1), "mmmm")
End Sub
 
my problem is not only for month april, that is example ...
i want it always up-to-date, now is april, so it will show april.When reach to next month, it will change to May...
 
If your field name is [Month] then this expression should work:
=MonthName([Month])
If it doesn't work then something is wrong. Did you check the name of your control?

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]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top