Year
Using the YEAR Function
In this tutorial you will learn how to use the YEAR Function.
The YEAR function returns an Integer containing a whole number representing the year.
=YEAR( date )
date date a value that represents a valid date, be that numeric or string also.
The result is 2012.
UK Date Format
FORM
In a Form you could set the Default Value of a Textbox to
=YEAR(#1/9/2012#)
VBA
In a Form add a TEXTBOX control and rename it "txtYear", then you could add the following in the Load Event.
Private Sub Form_Load()
txtYear = Year(#1/9/2012#)
End Sub
Course
Access Expert 11
Seminars
Access Fiscal
Search
You can find more about this by searching the website.
By: Alex Hedley
Click here to sign up for more FREE tips
|