Expression Help

K

Katherine R

Is there an expression I can use to take just the year from a date field on a
form and insert it into a text box on a report:
 
F

fredg

Is there an expression I can use to take just the year from a date field on a
form and insert it into a text box on a report:
If the field is included in the report's record source:
=Year([DateField])
or..
=Format([DateField],"yyyy")

If the form control is not included in the report's record source:
=Year(Forms!FormName!ControlName)
The form must be open when the report is run.
 
K

Katherine R

The field is included in the report's record source. Thanks!!

fredg said:
Is there an expression I can use to take just the year from a date field on a
form and insert it into a text box on a report:
If the field is included in the report's record source:
=Year([DateField])
or..
=Format([DateField],"yyyy")

If the form control is not included in the report's record source:
=Year(Forms!FormName!ControlName)
The form must be open when the report is run.
 
Top