This is my code:
Private Sub txtTestDate_AfterUpdate()
Dim str_txtTestDate As Date
str_txtTestDate = Me!txtTestDate.value
Me!txtTestYear = Year(str_txtTestDate)
Me!txtModifiedTestDatebyMonth = Month(str_txtTestDate)
Me!txtTestDate1 = Me!txtTestDate
End Sub
I have a "non date" type field and I am trying to format it to a date after updating it. It is being selected from a calendar control which works well but it is not working. What am I doing wrong?
Thanks.
Private Sub txtTestDate_AfterUpdate()
Dim str_txtTestDate As Date
str_txtTestDate = Me!txtTestDate.value
Me!txtTestYear = Year(str_txtTestDate)
Me!txtModifiedTestDatebyMonth = Month(str_txtTestDate)
Me!txtTestDate1 = Me!txtTestDate
End Sub
I have a "non date" type field and I am trying to format it to a date after updating it. It is being selected from a calendar control which works well but it is not working. What am I doing wrong?
Thanks.