Year in a Text Box

Crackers

Registered User.
Local time
Today, 20:26
Joined
May 31, 2002
Messages
36
I have a form that lists the winners of certain awards.
As the Heading of that Form I have the following text (as an example):

Best & Fairest Winner for [txtbox].

I have put the simple formula =Now() in the Textbox, but all I want it to do is show the year and not the actual month or day.
I looked at the format menu and it doesn't have that option.

Is there some way I can have just the year showing in the textbox without having to manually change it each year.

I have made the txtbox small enough so that it only shows the year on the end, but I was wondering if there is a correct way of doing it.

Thank-you for your help.
 
I would suggest the Datepart function, i.e. Datepart("yyyy",Date) will give you 2006
 
Also,
Code:
Debug.Print Year(#1/1/2006#)
2006
 
try
format(now(),"YYYY") or =format(now(),"YYYY") this will return current year "2006"

Carbo
 
The control source should be =Date(), then just set the display format on the property sheet to "YYYY"
 

Users who are viewing this thread

Back
Top Bottom