D
datin
hi, currently im helping HR to determine staffs dependants.So, i created
table where i calculate age. age is important to determine whether the kids
will attend public examination or not. my problem is i need to key in date of
birth every year to update age and public exam list.
Question 1 : please help me figure out this problem
my event procedure as below:
Private Sub DOB_AfterUpdate()
Dim age1 As String
Me!Age = DateDiff("yyyy", DOB, Date)
Refresh
If Me!Age = 15 Then
Me!Exam = "PMR"
Else
If Me!Age = 17 Then
Me!Exam = "SPM"
Else
If Me!Age = 12 Then
Me!Exam = "UPSR"
Else
Me!Exam = ""
End If
End If
End If
End Sub
question 2:
how to display current year ?
If Me!Age = 15 Then
Me!Exam = "PMR"
Me!Year= " ?"
thank you and regards
table where i calculate age. age is important to determine whether the kids
will attend public examination or not. my problem is i need to key in date of
birth every year to update age and public exam list.
Question 1 : please help me figure out this problem
my event procedure as below:
Private Sub DOB_AfterUpdate()
Dim age1 As String
Me!Age = DateDiff("yyyy", DOB, Date)
Refresh
If Me!Age = 15 Then
Me!Exam = "PMR"
Else
If Me!Age = 17 Then
Me!Exam = "SPM"
Else
If Me!Age = 12 Then
Me!Exam = "UPSR"
Else
Me!Exam = ""
End If
End If
End If
End Sub
question 2:
how to display current year ?
If Me!Age = 15 Then
Me!Exam = "PMR"
Me!Year= " ?"
thank you and regards