Taking Letters From a String (1 Viewer)

saross

Registered User.
Local time
Today, 01:36
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?
 

Sergeant

Someone's gotta do it
Local time
Yesterday, 20:36
Joined
Jan 4, 2003
Messages
638
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)
 

Smart

Registered User.
Local time
Today, 01:36
Joined
Jun 6, 2005
Messages
436
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
 

saross

Registered User.
Local time
Today, 01:36
Joined
Mar 4, 2003
Messages
120
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

Top Bottom