I used the name "Year" in tables as a field name. Now I would like to use the Access function Year(Date) within a user function.
The code:
gives me a Run-time error '13'; Type mismatch, because Year is a field name.
Is there a way to declare 'Year' as a Microsoft Function within a subroutine, i.e.
If not, is there an easy way to change all references to a table field name within my project? Includes Tables, Forms, Queries, and VBA Code.
The code:
Code:
Dim CYear as Integer CYear = Year(Date)
Is there a way to declare 'Year' as a Microsoft Function within a subroutine, i.e.
Code:
Dim Year as Function
Comment