Expression Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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:
 
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.
 
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.
 
Back
Top