A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Split Name field into 2 fields



 
 
Thread Tools Display Modes
  #1  
Old August 11th, 2004, 09:24 PM
S Jackson
external usenet poster
 
Posts: n/a
Default Split Name field into 2 fields

When I originally designed my table, I used one field for the Witness name,
called [WitName]. Now, I would like to divide that field into two fields:
[WitFirstName], [WitLastName]. Is there a way to do it without a lot of
manual data entry? If it has to be done with VB code, where do I place the
code? In a separate module?

TIA
S. Jackson


  #2  
Old August 11th, 2004, 09:42 PM
Robert Dickow
external usenet poster
 
Posts: n/a
Default Split Name field into 2 fields

"S Jackson" wrote in
:

When I originally designed my table, I used one field for the Witness
name, called [WitName]. Now, I would like to divide that field into
two fields: [WitFirstName], [WitLastName]. Is there a way to do it
without a lot of manual data entry? If it has to be done with VB
code, where do I place the code? In a separate module?


I could suggest a coule of tacs to take on this issue. If you have
consistent First + Last names in your current name field, with no middle
initials or reversals of order, you could simply read in the field and
split it when you display it.

Better, however, would be to restructure the table. To do this, you
could add a new last name field, and write a one-time script in whatever
language suits you that would parse the old name fields, split the
names, and then restore them in the new 'first name' and 'last name'
fields that you create, rename, restructure, or whatever. Then, you
could redesign whatever input forms you were using so that you can
conveniently enter the first and last names in the future. Revise any
other parts of your application to suit.

Bob Dickow


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
  #3  
Old August 11th, 2004, 09:53 PM
S Jackson
external usenet poster
 
Posts: n/a
Default Split Name field into 2 fields

Thank you for your reply. I do not know how to write the code to "parse"
the name field, but your reply gave me the proper search words ("parse name
field") to google it. Came up with this site as a starting point:
http://www.mvps.org/access/strings/str0001.htm

Wish me luck!
S. Jackson

"Robert Dickow" wrote in message
0...
"S Jackson" wrote in
:

When I originally designed my table, I used one field for the Witness
name, called [WitName]. Now, I would like to divide that field into
two fields: [WitFirstName], [WitLastName]. Is there a way to do it
without a lot of manual data entry? If it has to be done with VB
code, where do I place the code? In a separate module?


I could suggest a coule of tacs to take on this issue. If you have
consistent First + Last names in your current name field, with no middle
initials or reversals of order, you could simply read in the field and
split it when you display it.

Better, however, would be to restructure the table. To do this, you
could add a new last name field, and write a one-time script in whatever
language suits you that would parse the old name fields, split the
names, and then restore them in the new 'first name' and 'last name'
fields that you create, rename, restructure, or whatever. Then, you
could redesign whatever input forms you were using so that you can
conveniently enter the first and last names in the future. Revise any
other parts of your application to suit.

Bob Dickow


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----



  #4  
Old August 13th, 2004, 02:07 AM
Annelie
external usenet poster
 
Posts: n/a
Default Split Name field into 2 fields

Since I do not know what I am doing either, I rely on good old excel to do
the parsing for me, in steps, using text to columns. I seem to have much
better control over data that is not consistent. You can resort your lists
and parse lines that are inconsistent, rows at a time. Than I import the
results, as a new table into access, using the original name field name
along with the new parsed fields.
Add the new fields to your existing table in access. Then do an update query
and then delete the table that come from excel and the old name field from
your old table.
Annelie


"S Jackson" wrote in message
...
Thank you for your reply. I do not know how to write the code to "parse"
the name field, but your reply gave me the proper search words ("parse

name
field") to google it. Came up with this site as a starting point:
http://www.mvps.org/access/strings/str0001.htm

Wish me luck!
S. Jackson

"Robert Dickow" wrote in message
0...
"S Jackson" wrote in
:

When I originally designed my table, I used one field for the Witness
name, called [WitName]. Now, I would like to divide that field into
two fields: [WitFirstName], [WitLastName]. Is there a way to do it
without a lot of manual data entry? If it has to be done with VB
code, where do I place the code? In a separate module?


I could suggest a coule of tacs to take on this issue. If you have
consistent First + Last names in your current name field, with no middle
initials or reversals of order, you could simply read in the field and
split it when you display it.

Better, however, would be to restructure the table. To do this, you
could add a new last name field, and write a one-time script in whatever
language suits you that would parse the old name fields, split the
names, and then restore them in the new 'first name' and 'last name'
fields that you create, rename, restructure, or whatever. Then, you
could redesign whatever input forms you were using so that you can
conveniently enter the first and last names in the future. Revise any
other parts of your application to suit.

Bob Dickow


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting 3 x number fields to create date field vw Running & Setting Up Queries 2 August 11th, 2004 04:39 AM
Populating a field in a form based on another field's info. Tracey Using Forms 0 July 13th, 2004 08:10 PM
Access 2002 - Many to Many Relationships Lynn General Discussion 5 July 8th, 2004 12:55 AM
Seperate Notes/Memo field into seperate data fields Joe Williams Running & Setting Up Queries 6 July 4th, 2004 09:55 PM
ASK Field Behavior Greg Mailmerge 9 July 2nd, 2004 02:44 PM


All times are GMT +1. The time now is 03:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.