By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,506 Members | 2,311 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,506 IT Pros & Developers. It's quick & easy.

Seperating Full Name

P: n/a
I have a bounded field called Name.
It's used to type in the full name of a customer (intentionally set up that
way instead of seperating the first and last names)
I would like to be able to seperate the names in say a report.
When merging data from the database to a word document, I would like the
database to insert the first name for the "Dear" part of the letter. eg.
James Smith is the full entry in the field.
The report would simply take out the James part and insert it after the Dear
part of the letter..... Dear James,
What expression could I use in the unbound text box to give me the "James"
part ?
thanks for any assistance.
Nov 13 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Wed, 4 May 2005 20:41:29 +1000, "Jo K." <g4****@hotmail.com> wrote:
I have a bounded field called Name.
It's used to type in the full name of a customer (intentionally set up that
way instead of seperating the first and last names)
I would like to be able to seperate the names in say a report.
When merging data from the database to a word document, I would like the
database to insert the first name for the "Dear" part of the letter. eg.
James Smith is the full entry in the field.
The report would simply take out the James part and insert it after the Dear
part of the letter..... Dear James,
What expression could I use in the unbound text box to give me the "James"
part ?
thanks for any assistance.

="Dear " & LEFT([Name],instr([Name]," ")) & ","
Nov 13 '05 #2

P: n/a
Jo K. wrote:
I have a bounded field called Name.


See Chuck's response. Don't use "Name" as a field name. It's a
reserved word in acces which will get you into trouble. Use txtName or
something like that.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 13 '05 #3

P: n/a
If you have a "first" and "last" part of every name, your data is far better
behaved than most name lists. And, the solution suggested by Chuck should
work very nicely.

If your (renamed) field, Person, contains the value "Peggy Sue Smith", do
you want to adress "Dear Peggy" or, as she more likely expects, "Dear Peggy
Sue". Complicate this by having multiword last names as well, e.g., Di Carlo
or Van Horn, just as a start, and you'll realize why the best advice is to
enter FirstName, MiddleName, and LastName separately. That way, you don't
have to try to puzzle out in code how to separate "Bobby Joe Van Horn Di
Carlo" and the like...

Larry Linson
Microsoft Access MVP
"Jo K." <g4****@hotmail.com> wrote in message
news:42**********************@news.optusnet.com.au ...
I have a bounded field called Name.
It's used to type in the full name of a customer (intentionally set up that way instead of seperating the first and last names)
I would like to be able to seperate the names in say a report.
When merging data from the database to a word document, I would like the
database to insert the first name for the "Dear" part of the letter. eg. James Smith is the full entry in the field.
The report would simply take out the James part and insert it after the Dear part of the letter..... Dear James,
What expression could I use in the unbound text box to give me the "James"
part ?
thanks for any assistance.

Nov 13 '05 #4

P: n/a
Larry Linson wrote:
she more likely expects, "Dear Peggy Sue


I was taught you had to call 'em

Peggy Sue, Peggy Sue.
Pretty, pretty, pretty, pretty Peggy Sue

No?

--
--
Lyle
Nov 13 '05 #5

P: n/a

"Lyle Fairfield" <ly******@yahoo.ca> schreef in bericht news:Oc****************@read1.cgocable.net...

I was taught you had to call 'em

Peggy Sue, Peggy Sue.
Pretty, pretty, pretty, pretty Peggy Sue

No?


LOL
Good old Buddy often called her: Pa-he-ggy

Arno R
Nov 13 '05 #6

P: n/a
"Lyle Fairfield" wrote
she more likely expects, "Dear Peggy Sue


I was taught you had to call 'em

Peggy Sue, Peggy Sue.
Pretty, pretty, pretty, pretty Peggy Sue

No?


In a letter? That'd be an interesting salutation.


Nov 13 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.