Default to Current Year only (1 Viewer)

MikeG

Registered User.
Local time
Today, 05:51
Joined
Oct 1, 2001
Messages
31
I would like to be able to default my Curr_Yr field without showing it on a form, thus eliminating interaction by the data entry operator. If there a way to do that via the default value entry? I'll need it later for reports, etc...plus it's part of a multiple key field. I've searched on all the date/year wording variations here that I can think of but couldn't find much help. Any help is greatly appreciated!
 

FoFa

Registered User.
Local time
Yesterday, 23:51
Joined
Jan 29, 2003
Messages
3,672
In the default for that field, try
=YEAR(date())

you can format also if you wish. You can make the field invisible if you do not want them to see it.
 
D

DJN

Guest
Put =DatePart('yyyy',Date()) in the Default Value property of the Curr_Yr field. If you don't want you users to 'fiddle' with the date, change the Locked property of the field to yes.


David
 

MikeG

Registered User.
Local time
Today, 05:51
Joined
Oct 1, 2001
Messages
31
OUTSTANDING!! Works like a charm!
Thanks again!

mg
 

hootie318

Registered User.
Local time
Today, 05:51
Joined
Oct 28, 2003
Messages
130
I just want to have the last two digits of the current year. Anyone have anything for that?
 

fuzzygeek

Energy Ebbing
Local time
Today, 05:51
Joined
Mar 28, 2003
Messages
989
hootie318 said:
I just want to have the last two digits of the current year. Anyone have anything for that?

=Mid(DatePart('yyyy',Date()),3,2)
 

Users who are viewing this thread

Top Bottom