Taking Letters From a String

saross

Registered User.
Local time
Today, 01:00
Joined
Mar 4, 2003
Messages
120
Hi all, I'm not sure if this is possible ...

I have a table which has contact details in it... two fields are FirstName and Surname. I want to create a new field called initials which takes the first letter from each of the former two fields. Is it possible to do this using an update query?

Or any other way maybe?
 
saross said:
Hi all, I'm not sure if this is possible ...

I have a table which has contact details in it... two fields are FirstName and Surname. I want to create a new field called initials which takes the first letter from each of the former two fields. Is it possible to do this using an update query?
Yes, but as long as the first and last name are still in the table...why would you want to store their first letters in another field?

You can get the initials any time you want with:
=Left(FirstName,1) & Left(Surname,1)
 
In your query place the following

Init: Left([firstname],1) & Left([lastname],1)

Replace firstname with your first name field
Replace lastname with your last name field

in the table as
Joe Bloggs
Pete Smith

Output in the query is
JB
PS
 
Thanks!

Wow thanks that's great! I'll use that code in the module and output the initials direct to the job creation sheet rather than creating an additional field in my table!

Thanks again!

:D
 

Users who are viewing this thread

Back
Top Bottom