473,385 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Get first letter of each word in a string

I want to write letters to people in my database. I have a field
Surname and a field FirstNames.

How do I get the first letters of each word in FirstNames?

For example: Surname "Bloggs" FirstNames "John Henry"

I want to addres a letter to "J H Bloggs"
Nov 12 '05 #1
2 20386
Expr1: Left([nm],1) & IIf(InStr(1,[nm],"
")<>0,Mid([nm],InStr(1,[nm],"-"),2),"")

Use this in a query and it should do the trick for 1 or 2 FirstNames.

P
"Peter McKeown" <pe**********@blackden2.freeserve.co.uk> wrote in message
news:95**************************@posting.google.c om...
I want to write letters to people in my database. I have a field
Surname and a field FirstNames.

How do I get the first letters of each word in FirstNames?

For example: Surname "Bloggs" FirstNames "John Henry"

I want to addres a letter to "J H Bloggs"

Nov 12 '05 #2
check out Dev's site for string manipulation...modify as needed.

http://www.mvps.org/access/strings/index.html
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dwight | last post by:
Hi all, How do you capitalize the first letter of each word in a field. I can format the field to UPPER case the last name of a person, but I can't UPPER case just the first letter of each name....
1
by: Dwight Shubert | last post by:
Hi all, This is my first try using Access. I understand how to format a text field for uppercase and lowercase, but how do you capitalize only the first letter of each word? tia Dwight
5
by: Xero | last post by:
How do you get a specific letter from a word? For example, in English, I would say: Get the fifth letter from the word "Computer" Then the letter 'u' will be returned. (C-O-M-P-U-..., 'u' is...
2
by: setabery | last post by:
When entering a value to a field, is there a way to make only the first letter upper case without using the Shift Key? For example, entering a name.
5
by: Rotor | last post by:
Okay I know how to upper case the first word. However, how do I make it so first letter of each word in the same field is capitalized? Thxs.
9
by: Ulterior | last post by:
Hi, everyone, I have a simple problem, which bothers me for some while. I will try to explain it - There is some string, whith different letters in it. Is it possible to analyse this string...
3
by: majorecono | last post by:
What I'm bad at is the dialog box part. This is the code Ive come up with... if you see a way to improve what im thinkng of.... post it please. Program should.... 1. Ask user to type in a...
4
by: zcabeli | last post by:
Hi all, i'm currently struggling to perform the above mentioned replacement. i already know how to catch the first letter in each word and determined if it's regular or capital. however, i...
2
by: whodgson | last post by:
The following code accepts a string from the user and swaps the first and last letters in each word. It prints out the original string incorrectly by dropping off the first letter of the first word....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.