Name? Error

  • Thread starter Thread starter Lyn
  • Start date Start date
L

Lyn

Can somebody offer advice as to what is wrong with this?
=(Select Case [DatePart("m",Now())] case 10 "October" case
else "February" end select)

Thanks a lot!!!!
 
Almost all of it is wrong except the logic ;-0
=IIf(Month(Date())=10,"October","February")

I'm also not sure about the logic since next month, this expression will
return February.
 
I have to do it for all the 12 months. Data below is just
a sample.
Thanks.

-----Original Message-----
Almost all of it is wrong except the logic ;-0
=IIf(Month(Date())=10,"October","February")

I'm also not sure about the logic since next month, this expression will
return February.

--
Duane Hookom
MS Access MVP
--

Lyn said:
Can somebody offer advice as to what is wrong with this?
=(Select Case [DatePart("m",Now())] case 10 "October" case
else "February" end select)

Thanks a lot!!!!


.
 
You are making this much more difficult than it is. Try:
=MonthName(Date())
or
=Format(Date(),"mmmm")

--
Duane Hookom
MS Access MVP
--

Lyn said:
I have to do it for all the 12 months. Data below is just
a sample.
Thanks.

-----Original Message-----
Almost all of it is wrong except the logic ;-0
=IIf(Month(Date())=10,"October","February")

I'm also not sure about the logic since next month, this expression will
return February.

--
Duane Hookom
MS Access MVP
--

Lyn said:
Can somebody offer advice as to what is wrong with this?
=(Select Case [DatePart("m",Now())] case 10 "October" case
else "February" end select)

Thanks a lot!!!!


.
 
Works great!!! Thank you!!!
-----Original Message-----
You are making this much more difficult than it is. Try:
=MonthName(Date())
or
=Format(Date(),"mmmm")

--
Duane Hookom
MS Access MVP
--

I have to do it for all the 12 months. Data below is just
a sample.
Thanks.

-----Original Message-----
Almost all of it is wrong except the logic ;-0
=IIf(Month(Date())=10,"October","February")

I'm also not sure about the logic since next month, this expression will
return February.

--
Duane Hookom
MS Access MVP
--

Can somebody offer advice as to what is wrong with this?
=(Select Case [DatePart("m",Now())] case 10 "October" case
else "February" end select)

Thanks a lot!!!!



.


.
 
Back
Top