Using the Year() function and updating another field in Microsoft Access

By toddmehl ·
I am trying to do something to help users of a program I am writing. I want it such that the user finishes typing in the date, and when they move on to another field, it does the following:
-automatically takes the date (in this case: DateCall) and breaks it down to the year (hence the year function)
-it puts this year into the field FiscalYear
-the form (RunReport) then refreshes showing this updated field.

The table is the same for both the DateCall and FiscalYear fields. Here is the code I have manipulated many times without luck:

Private Sub DateCall_LostFocus()

RequiredInfoAllCalls.FiscalYear = Year(RequiredInfoAllCalls.DateCall)


End Sub

Any help would be appreciated. Thanks in advance!

Todd Mehl
Somerville, AL

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Share your knowledge

Related Discussions

Related Forums