First Letter of each word

  • Thread starter Thread starter PJ
  • Start date Start date
P

PJ

I have the following in a text box field:

=IIf([Comp Entered By] Is Null,"",Left([Comp Entered By],1) & Mid([Comp
Entered By],InStr(1,[Comp Entered By],",")+2,1))

the field "Comp Entered By" is based off of a lookup table of names.

I want the above code to only give me the initials of any given name like:

Christian Many would be CM and the above code is giving me Ch.

What should I change on the above code?

Thanks in advance
 
Assuming a max of two words, and exactly one space between first and last word.

Left([Comp Entered By],1) &
MID([Comp Entered By],Instr(1,[Comp Entered By]," ")+1,1)

IF you have more than two words (names) in the field then you have to decide
what you want to do. Oscar de la Renta, Mary Jo Kopechne, Mary Anne Smythe
 
Back
Top