Hi there,
I am trying to figure out how to calculate a Tax Deadline date for a new Access DB. Each year a client will have a record relating to their return with various deadlines in it. One deadline is 9 months after the companies year end but not later than the 21st day of that month. So for example with a year end of 31/12/13, their filing deadline is 21/09/13. I am putting this code behind the On_Change function of the CurrentYearEnd field.
So I have figured out how to use variables to add 9 months onto the Year End as follows:
Private Sub CurrentYearEnd_Change()
Dim dtCurrentYearEnd As Date
Dim dtCTFilingDeadlineDate As Date
dtCurrentYearEnd = CurrentYearEnd.text
dtCTFilingDeadlineDate = DateAdd("m", 9, dtCurrentYearEnd)
CTFilingDeadlineDate.SetFocus
CTFilingDeadlineDate.text = dtCTFilingDeadlineDate
This works, however how do I strip this date back to the 21st of the month?
Many thanks for any help