Hi,
hope someone could help.
On a form, I have three date fields Date1, Date2 and Date3 and format of all three fields is shortdate. I want field Date3 to be auto-poluate by this formula (Date1 - Date2) +1 after user enter Date1 and Date2. I built this VAB code on the AfterEvent of Date2 field.
I got the result of a date but not the correct date as 12/29/1899. any idea why?
thanks
777bonzai
hope someone could help.
On a form, I have three date fields Date1, Date2 and Date3 and format of all three fields is shortdate. I want field Date3 to be auto-poluate by this formula (Date1 - Date2) +1 after user enter Date1 and Date2. I built this VAB code on the AfterEvent of Date2 field.
Code:
Private Sub Date2_AfterUpdate() If Not IsNull(Me![Date2]) And IsDate(Me![Date2]) And Not IsNull(Me![Date1]) And IsDate(Me![Date1]) Then Me.Date3 = (([Date2]-[Date1])+1) End If End Sub
thanks
777bonzai
Comment