Hello All,
I'm use a form as a data entry that flows to a table. In the data entry form I have a field titled "StatementDate", that field is used to calculate the "DueDate". I'm trying to use the StatementDate field to calculate a ServicePeriod field as well with the following criteria:
If the statement day is the 15th or later than the service period would be the next month, if before the 15th the service period is the month of the StatementDate. Example
StatementDate = 1/14/2013, then the ServicePeriod would be 01/2013
StatementDate = 1/15/2013, then the ServicePeriod would be 02/2013
The VBA Code to calculate the DueDate is as follows:
Private Sub DueDate_Enter()
DueDate = DateAdd("d", 14, Me.StatementDate)
End Sub
I'm not sure, but I'm guessing I'll have to use the DatePart function to pull the day from the StatementDate?
Any input or tips on trying to achieve the desired results?