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!

Displaying A Month In Access

Status
Not open for further replies.

FontanaS

Programmer
May 1, 2001
357
US
I have a combo box that is a list of months.
They are in the format of "January", February".

I want the default to be Month(Now()). But I don't want the number, I want the word.

Ex - 4 will show for April. I actually want the word april instead of the number.

Any suggestions?
 
You can do an IIf statement... IIf([Month]="1","January"IIf[Month]="2","February"

Etc...

I think you would have to make a query from your table and use the query to populate your combo box. Someone may correct me on this. I am doing this to find actual weekdays. Ya' Gotta Love It!:)X-)
 
Correction:

IIf statement... IIf([Month]="1","January",IIf[Month]="2","February",etc.

Ya' Gotta Love It!:)X-)
 
Correction 2: (I will get it right eventually)


IIf(Month(Now())=1,"January",IIf(Month(Now())=2,"February",IIf(Month(Now())=3,"March",IIf(Month(Now())=4,"April",IIf(Month(Now())=5,"May",IIf(Month(Now())=6,"June",IIf(Month(Now())=7,"July",IIf(Month(Now())=8,"August",IIf(Month(Now())=9,"September",IIf(Month(Now())=10,"October",IIf(Month(Now())=11,"November",IIf(Month(Now())=12,"December")))))))))))) Ya' Gotta Love It!:)X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top