All, using access 2010. How do I display the default value of a date/time field to just the current year instead of using =date() to get the full date.
I used the format to get the year; yyyy but why does it give me 1905? Do I need to use serial in front and how because =year(serial(date())) gives me an error.
If you want to get the year from one of YOUR fields use:
Year(yourfield)
If you want the current year, it should b
Year(Date()) as Paul suggested.
Functions are your friend and VBA has many. EVERYONE would benefit from reading through the list periodically to refresh their memory of what is available. Use the list organized by category so you'll see all the "date" functions together and all the "financial" functions etc. The alpha list is pretty useless unless you know the function's name.