query to convert name to initials

techexpressinc

Registered User.
Local time
Today, 13:16
Joined
Nov 26, 2008
Messages
185
I have names in one field and I want it to be initials in a new field. Can someone gave me a push.

Field Name = Tom Smith

Field Initials = TS

I have Name. So, I am thinking it would be:

In the query it would be a new field

Initials: ????

Some Function or Iff statements...


THX
for the Help
Russ
 
Use the Split() function to pass the ords into an array and lop off the first letter of each item in the array
 
Thx for the help I ended up with this:

initial= left(fname,1) & mid(fname,instr(1,fname &" "," ")+1,1)
 
Also, another good reason why you should store names in Separate fields (first in one, last in another, and middle in another). Then you can even more easily just pull what you want when you want and don't need to worry that someone has a strange name which then makes it hard to parse out.
 

Users who are viewing this thread

Back
Top Bottom