year and month wrong

K

Keith

I have been away from Access for a while so I might be doing something stupid.

I an writing a report and in the header I want to show the month and year
taken from a date field. I have used the control source as

=month([Date Entered])
=year([Date Entered])

But the always come out as January and 1905

What am I doing wrong?
 
D

Duane Hookom

What is the format of the text boxes? I would just set the control source to
the actual date and then use the format to set the format (month, year,...)

Your problem might be that the following is returning a number from 1-12.
=month([Date Entered])
If you then set the format property of the control, you are formatting the
small number, not a date.
 

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

Top