?
2011-02-03 05:38:23 UTC
Sub Age()
Dim PATIENT_VIEW_DOB As Date
PATIENT_VIEW_DOB = #4/22/1983#
Dim CLAIM_VIEW_CLAIM_FROM As Date
CLAIM_VIEW_CLAIM_FROM = #12/31/2010#
Dim Age As Integer
Age = DateDiff(DateInterval.Year, PATIENT_VIEW_DOB, CLAIM_VIEW_CLAIM_FROM)
MsgBox (Age)
I want a Message Box to display the results of the formula in the Age variable. I run the compiler and it checks out, however when I run the routine I get "Run-time error '424': Object Required.
Hitting the 'Debug' option highlights the line
Age = DateDiff(DateInterval.Year, PATIENT_VIEW_DOB, CLAIM_VIEW_CLAIM_FROM)
Could somebody help me out? Thanks!