Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current year in unbound text box 1

Status
Not open for further replies.

jer007

Technical User
Feb 16, 2004
94
CA
This sounds easy but for some reason I can't seem to get it to work.

I have an unbound text box. When the form is opened I want it to display the current year. I do not want the month or day in this text box.

If you know how to do this I'd appriciate the help

Thanks
 
How are ya jer007 . . . . .

In the [blue]ControlSource[/blue] of the textbox, try the following:
Code:
[blue] = Format(Now(),"yyyy")[/blue]

Calvin.gif
See Ya! . . . . . .
 
Thanks AceMan!

I new it was embarrassingly simple. It gets so cold here in Canada the brain just doesn't fire at full speed.

Thanks again!
 
Jer007--you can look in HELP under DATE FORMATS to get all kinds of functions like that.

I would use

= Year(Date())

Aceman--i was gonna try to teach Jer to fish!!
 
How are ya GingerR . . . . .

[purple]You have the power![/purple]

[blue]Merry Christmas & Happy NewYear![/blue] ;-)

Calvin.gif
See Ya! . . . . . .
 
Yet a third option is to try =Year(Now()).

(also available, Day(), Month())
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top