We help IT Professionals succeed at work.

Access VBA Calculate date in this or next year

Murray Brown
Murray Brown asked
on
Hi

What Access VBA code would I use to calculate the date of the next 31st of March, whether that be in this year or the next?

Thanks
Comment
Watch Question

You can use this for this years date:

YourDate = DateValue("March 31 " & Year(Now()) )

And this for next year:

YourDate = DateValue("March 31 " & Year(Now()) + 1)

Paul
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
thanks very much
You're welcome. Happy to help out!