Problem with Year Function

  • Thread starter Thread starter Steve Burgess via AccessMonster.com
  • Start date Start date
S

Steve Burgess via AccessMonster.com

I am developing an application in Access 2002. I am having a problem with
the year function in my code. The code is:

xc = Year(Date)

When it hits this line of code, I get a run-time error 438 - Object doesn't
support property or method. Any ideas?

Steve
 
Steve

Just a guess, but do you have a field named "Date"? If so, you are
confusing Access (which regards this as a "reserved" word), and yourself.
If one (or more) of your tables' fields are named "Date", change them!

What do you get if you try (testing only) using:

Year(1/1/2005)

Jeff Boyce
<Access MVP>
 
Back
Top