Hello folks, here's my problem: I need to calculate the due date of something when a form opens. This due date is based on a previous date and a frequency interval, the latter two are stored in a table. The form has the following fields/controls: a textbox called MyLastDate, a combobox called MyFrequencyCombo and another textbox called MyDueDate.
The DateAdd function is currently performing this calculation and it works as expected:
Now the client wants all of the due dates to fall on the same day of the year - June 30th - regardless of the value of MyLastDate. (don't askCode:MyDueDate = DateAdd("yyyy", MyFrequencyCombo.Column(1), MyLastDate))
For example, if MyLastDate is March 17, 2024 and MyFrequencyCombo is "2" then MyDueDate should be June 30, 2026.
I thought I remember seeing a post somewhere along the line of using constants in the DateAdd Fx, but can't seem to find it now.
Any ideas on how to accomplish this calculation?
disclaimer: I do not have the client's permission to post the database