First, if your field is really named date, I recommend changing it to something else as "date" is a reserved word. Something like TrainingDate would work fine. That said, try this:
I set up a table (YourTableName) and added two columns (hours and TrainingDate). I then created a form with two unbound controls: txtDateYear and txtTotalHours. In the after update field of txtDateYear I have the following code:
-
Private Sub txtDateYear_AfterUpdate()
-
-
txtTotalHours = DSum("[hours]", "YourTableName", "[TrainingDate] Like '*" & [txtDateYear] & "'")
-
-
End Sub
When you type/select a year from txtDateYear it will automatically populate txtTotalHours with the total number of hours for that year.
Let me know if you have any questions.