If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
First Letter of each word
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 |
#2
|
|||
|
|||
First Letter of each word
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 PJ wrote: 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 |
Thread Tools | |
Display Modes | |
|
|