Text functions for Lower case

R

Raymond

Does acces have equivalent text functions to the Upper(),
Lower(), and Proper() that are available in Excel?

Thanks, Raymond
 
J

Jen

Hi Raymond,

I'm only aware of:

Upper() = UCase()
Lower() = LCase()

I don't think there's an equivalent function for Proper()
in Access.

Regards,
Jen
 
B

Brian Camire

The (almost) equivalent of Proper() in Access is to use StrConv() with 3
(vbProperCase) as the second argument. For example:

StrConv("john smith", 3)

returns

"John Smith"

The behavior of StrConv() is slightly different from Proper().

StrConv() captializes the first letter in a string and any other letters
that follow a white space (e.g., space, tab, carriage return, etc.).

Proper() capitalizes the first letter in a string and any other letters that
follow any character other than a letter.

For example:

StrConv("o'brien", 3)

returns

"O'brien"

but

Proper("o'brien")

returns

"O'Brien"
 
R

raymond

Perfect, Jen.

Thanks, Raymond
-----Original Message-----
Hi Raymond,

I'm only aware of:

Upper() = UCase()
Lower() = LCase()

I don't think there's an equivalent function for Proper()
in Access.

Regards,
Jen

.
 
F

Fredg

UCase([FieldName])
LCase(FieldName])

If you are using VBA code:
StrConv([FieldName],vbProperCase)
but in a query or form or report, you must use the constant's numeric value:
StrConv([FieldName],3)

StrConv() may have unintended consequenses, as McDaniel will become
Mcdaniel, O'Connor becomes O'connor, ABC becomes Abc, etc.

The only alternative is to have a lookup table of exceptions to compare
words to, and use the table name instead of StrConv() if that exception is
found.
 

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