Good day! when i enter dates for December, it would be Dec 2021... is there a way that December is 2020 and January 2021? TIA!
Good day! when i enter dates for December, it would be Dec 2021... is there a way that December is 2020 and January 2021? TIA!
perhaps in the control afterupdate event put something like
orCode:if month(mycontrol)=12 and year(mycontrol)=year(date) then mycontrol=dateadd("yyyy",-1,mycontrol) end if
really depends on your actual requirements - what if they really want to enter a date in dec 2021? You would need to include a msgbox to verify it was ok to change the yearCode:if mycontrol>date then mycontrol=dateadd("yyyy",-1,mycontrol)
Are you really saying if you enter 12/25/2020 it is becoming 12/25/2021?
How, exactly, are you entering these dates?
Linq ;0)>
25/12 for Dec 25, 2020
Perhaps check if current month < 6 and if so subtract 1 year from date entered.?
By the time you get to June you will likely be wanting to put in December as 2021 ?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba