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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top