HOW DO I CHANGE IN MASS SOMEONES NAME FIRST NAME LAST, LAST NAME F

W

Walmat

I HAVE A MOVIE DATABASE WITH THOUSANDS OF NAMES OF STARS, I WOULD LIKE TO
KNOW HOW DO I CHANGE IN MASS SOMEONES NAME, FIRST NAME LAST, LAST NAME
FIRST. EXAMPLE JOE BLOGGS TO BLOGGS, JOE, MANY THANKS, WAMAT
 
T

Tom Wickerath

Hi Wamat,

First, please ease up on the all caps. This is considered shouting, and it's
not easy to read.

The best thing to do is add a new field to your table, so that you can store
FirstName and LastName in separate fields. Fields should be used to store
data in it's simplist ("atomic") form. Having both names in the same field is
not the simplist form.

One of my favorite utilities for splitting names in Access is called
"Splitter for Microsoft Access". If you don't mind popping $39 for a copy,
you will have a very good utility that can untangle the messiest name data:

http://www.infoplan.com.au/splitter/

A very easy method to use involves exporting the table to Excel. From within
Excel, use Data > Text to Columns... Then re-import your table back into
Access.

You can also create the new fields in the table and then use an update query
to populate the new fields. The update query would look like this:

Field: LastName
Table: Your tablename
Update To: SplitName([FullName],1)

Field: FirstName
Table: Your tablename
Update To: SplitName([FullName],0)

Create a new standard module. Then copy and paste the following function
into it. This will create a zero-based array named strResult. The On Error
Resume Next statement will prevent the function from choking to a halt if
there is no name for a given record.

Public Function SplitName(FullName As String, _
intElement As Integer) As String
On Error Resume Next

Dim strResult() As String
strResult = Split([FullName], Chr(32))

SplitName = strResult(intElement)

End Function


Tom

http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

I HAVE A MOVIE DATABASE WITH THOUSANDS OF NAMES OF STARS, I WOULD LIKE TO
KNOW HOW DO I CHANGE IN MASS SOMEONES NAME, FIRST NAME LAST, LAST NAME
FIRST. EXAMPLE JOE BLOGGS TO BLOGGS, JOE, MANY THANKS, WAMAT
 
L

lindaroy

Walmat said:
I HAVE A MOVIE DATABASE WITH THOUSANDS OF NAMES OF STARS, I WOULD LIKE TO
KNOW HOW DO I CHANGE IN MASS SOMEONES NAME, FIRST NAME LAST, LAST NAME
FIRST. EXAMPLE JOE BLOGGS TO BLOGGS, JOE, MANY THANKS, WAMATfracais
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top