Text functions for Lower case

  • Thread starter Thread starter Raymond
  • Start date Start date
R

Raymond

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

Thanks, Raymond
 
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
 
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"
 
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

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