Forcing upper case

T

Tony Williams

I have a date/time control on a report and in one place I want to force the
month name into upper case. How do I do that using Format?
TIA
Tony Williams
 
M

Marshall Barton

Tony said:
I have a date/time control on a report and in one place I want to force the
month name into upper case. How do I do that using Format?


I don't think you can do that using just the Format
property.

You can do it using a control source expression. Probably
the simplest is:
=UCase(Format(datefield, "mmmm d, yyyy"))
 
J

John Spencer (MVP)

Format function? or Format Property of the control?

With the function I would just use the UCase function in conjunction with the
format function.

UCase(Format([SomeDate],"mmmm d, yyyy")

OR

Format((Format(Date(),"mmmm d, yyyy")),">")

Format property of the control would be more problematic, since unless the date
was already formatted in the underlying query you couldn't force the format to
ucase using the ">" to set the format. As that would automatically change the
date to a number representing the number of days since December 30, 1899.
 
T

Tony Williams

Thanks Marsh here is my control source which I used in my report
=UCase(Format([txtmonthlabel],"mmmm yyyy"))
txtmonthlabel is a date/time field with a mmmm yyyy format but I get
#Error. What am I doing wrong?
Tony
 
M

Marshall Barton

Tony said:
Thanks Marsh here is my control source which I used in my report
=UCase(Format([txtmonthlabel],"mmmm yyyy"))
txtmonthlabel is a date/time field with a mmmm yyyy format but I get
#Error. What am I doing wrong?

The text box is probably still named txtmonthlabel. If so,
change it to something other than a field name.
--
Marsh
MVP [MS Access]


 
T

Tony Williams

You guys never fail to amaze me! How do you know all of this? At 60 and
retired, I don't think I could possibly remember as much about the world of
credit where I worked for 34 years!
Thanks again Marsh, that was the problem, works fine.
Tony
Marshall Barton said:
Tony said:
Thanks Marsh here is my control source which I used in my report
=UCase(Format([txtmonthlabel],"mmmm yyyy"))
txtmonthlabel is a date/time field with a mmmm yyyy format but I get
#Error. What am I doing wrong?

The text box is probably still named txtmonthlabel. If so,
change it to something other than a field name.
--
Marsh
MVP [MS Access]


force
the
 
M

Marshall Barton

Tony said:
You guys never fail to amaze me! How do you know all of this? At 60 and
retired, I don't think I could possibly remember as much about the world of
credit where I worked for 34 years!


Well, Tony, I only have five more years on you, but, failing
memory aside, it's difficult to forget something that smacks
you in the face every other day ;-)
--
Marsh
MVP [MS Access]



Tony said:
Thanks Marsh here is my control source which I used in my report
=UCase(Format([txtmonthlabel],"mmmm yyyy"))
txtmonthlabel is a date/time field with a mmmm yyyy format but I get
#Error. What am I doing wrong?
"Marshall Barton" wrote
The text box is probably still named txtmonthlabel. If so,
change it to something other than a field name.

Tony Williams wrote:
I have a date/time control on a report and in one place I want to force
the
month name into upper case. How do I do that using Format?

I don't think you can do that using just the Format
property.

You can do it using a control source expression. Probably
the simplest is:
=UCase(Format(datefield, "mmmm d, yyyy"))
 
T

Tony Williams

Point taken, nice to know there's hope for us "oldies" yet
Tony
Marshall Barton said:
Tony said:
You guys never fail to amaze me! How do you know all of this? At 60 and
retired, I don't think I could possibly remember as much about the world of
credit where I worked for 34 years!


Well, Tony, I only have five more years on you, but, failing
memory aside, it's difficult to forget something that smacks
you in the face every other day ;-)
--
Marsh
MVP [MS Access]



Tony Williams wrote:
Thanks Marsh here is my control source which I used in my report
=UCase(Format([txtmonthlabel],"mmmm yyyy"))
txtmonthlabel is a date/time field with a mmmm yyyy format but I get
#Error. What am I doing wrong?
"Marshall Barton" wrote
The text box is probably still named txtmonthlabel. If so,
change it to something other than a field name.


Tony Williams wrote:
I have a date/time control on a report and in one place I want to force
the
month name into upper case. How do I do that using Format?

I don't think you can do that using just the Format
property.

You can do it using a control source expression. Probably
the simplest is:
=UCase(Format(datefield, "mmmm d, yyyy"))
 

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

Similar Threads


Top