Proper Text in MS Access

Excel has the default function Proper, which allows the ability to display only the first letter of a capitalized word; obviously, if that field contains more than one word, they are all written with the first letter capitalized, even if those words are separated by a hyphen (as is often the case with compound names or first names).

Access has a function that is somewhat similar: StrConv; I say somewhat “similar” because:

  • has an extra argument – number 3 (using number 1 would convert everything to uppercase – the equivalent of UCase, and 2 would convert everything to lowercase – the equivalent of LCase);
  • if we are talking about fields that contain compound words, with a hyphen, or that start with numbers, the second word will not be capitalized.

A fast variation can be combinations of functions: Left, Right, InStr, either using SQL directly or integrated into a VBA function, so that it can be easily used whenever needed in that application.

A disadvantage would be if there were at least three words joined by a hyphen, that it would be only the first appearance written with the first capital letter.

A little deeper can be the following function exemplified on the Microsoft site:

Author: Ovidiu.S

I am quite passionate about this professional area as if I know something - no matter how little - I want to share it with others.

Leave a Reply