Printing a fixed date next year

Printing a fixed date next year

Post by Robin Chap » Sun, 31 Jul 2005 10:00:32


I need to print membership cards which show

"Valid to June (Next Year)" always.

I have adapted some earlier advice to build both of these options
which work but seem clumsy.

="Valid to June " & DatePart("yyyy",Date()+365)

="Valid to June " &
Year(Date())+(Date()<DateSerial(Year(Date()),7,2))+1

Is there an easier piece of code?

Thanks,

Robin Chapple
 
 
 

Printing a fixed date next year

Post by Ken Snell » Sun, 31 Jul 2005 10:33:28

Easier? I leave that to you as a conclusion:


="Valid to June " & Year(Date()) - (Date() > DateSerial(Year(Date(), 7, 0))

or

="Valid to June " & Year(Date()) - (Month(Date()) > 6)

--

Ken Snell
<MS ACCESS MVP>

 
 
 

Printing a fixed date next year

Post by Tom Lak » Sun, 31 Jul 2005 15:00:35

>I need to print membership cards which show

Does this do it for you?

= "Valid to June " & Year(Date()) + 1

Tom Lake