G
Guest
Hello,
I haven't been doing VBA in a while, so I'm a little rusty. On the "on load"
event of a form, I have the following code, which is supposed to give me the
difference between someone's "hire date" and today, in years. I keep getting
2545, which obviously is wrong. Thanks for any help you can provide.
Private Sub Form_Load()
Dim vOLPTotal
Dim myDate As Date
myDate = Date
Me.Total_OLP_Days.Value = DateDiff("y", Now, Me.Hire_Date.Value)
I haven't been doing VBA in a while, so I'm a little rusty. On the "on load"
event of a form, I have the following code, which is supposed to give me the
difference between someone's "hire date" and today, in years. I keep getting
2545, which obviously is wrong. Thanks for any help you can provide.
Private Sub Form_Load()
Dim vOLPTotal
Dim myDate As Date
myDate = Date
Me.Total_OLP_Days.Value = DateDiff("y", Now, Me.Hire_Date.Value)