I have two controls, [Inception Date] and [Expiry Date] for for an insurance policy application. So Insert Inception Date and the Expiry Date is calculated. I am here using (as +365 days isn't always correct).
Dim Tempdate
Tempdate = [Inception Date]
[Expiry Date] = DateAdd ("Yyyy", 1, "Tempdate")
Enter 1 March 2011 and this returns 29 Feb 2012.
At first glance, this seems to be correct for an insurance policy as expiry is always one day befor renewal. However;
Enter 1 March 2012 and it now returns 1 March 2013.
I have tried
[Expiry Date] = DateAdd ("Yyyy", 1, "Tempdate") - 1
Also
[Expiry Date] = (DateAdd ("Yyyy", 1, "Tempdate") - 1)
An each time when I enter 1 march 2012 and it returns 1 March 2013. Surely one of these should result in a day earlier? I thought DateAdd handled leap years OK? What am I missing?
Help please? BTW, I am using the (date picker) - is that the same as the 'calendar control', mentioned in the previous thread as no longer supported? Does it hence have a bug? If yes, is ait available under Date/Time properties?