PC Review


Reply
Thread Tools Rate Thread

How do I break an Access field into pieces (ie ( [Mrs & Mrs] [Joh.

 
 
=?Utf-8?B?Qm5vbHQxMHM=?=
Guest
Posts: n/a
 
      25th Oct 2004
I've "inherited" a database where the Title and First Name are a single
field. Is there an easy way to break them into 2 field?
 
Reply With Quote
 
 
 
 
Wayne Morgan
Guest
Posts: n/a
 
      25th Oct 2004
Create a new field (or 2 if you prefer) for the Title and, if 2, for the
First Name. Run an Update Query to update these fields to the new values.
You will use a calculated field in the query to do the update.

This should work as long as there aren't any spaces in the first names
themselves. If you go into 2 new fields, your old field will still be there
as a backup until you verify that everything worked correctly. If you update
the old field, then I would do this one field at a time. Create the title
field first and verify that it is correct, then update the old first name
field.

For the Title field
UPDATE tblMyTable Set tblMyTable.Title = Trim(Left([OldField],
InStrRev([OldField], " ")))

For the First Name field
UPDATE tblMyTable Set tblMyTable.FirstName = Trim(Mid([OldField],
InStrRev([OldField], " ")))

--
Wayne Morgan
MS Access MVP


"Bnolt10s" <(E-Mail Removed)> wrote in message
news:033D798E-3641-4AC1-B754-(E-Mail Removed)...
> I've "inherited" a database where the Title and First Name are a single
> field. Is there an easy way to break them into 2 field?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CAN OUTLOOK BREAK LARGE FILE ATTACHMENTS INTO SMALLER PIECES =?Utf-8?B?Qk9C?= Microsoft Outlook Installation 1 23rd May 2007 09:53 PM
What is your favorite video/computer game to learn to break a problem down into manageable pieces and analyze a challenge logically and think under pressures? bobdouble@hotmail.com Windows XP Games 0 29th Nov 2006 03:28 AM
How to Page Break on First letter of a field in Access report =?Utf-8?B?dGhlX2xpcHN0ZXI=?= Microsoft Access Reports 6 6th Aug 2006 09:45 PM
Break out multiple pieces of a pie chart - keeping them together =?Utf-8?B?cGFibG9iYW5kaXRv?= Microsoft Powerpoint 2 8th Aug 2005 03:15 PM
How do you page break on a specific field in an Access Report? =?Utf-8?B?aWdpZHR0YW0=?= Microsoft Access Reports 1 14th Mar 2005 08:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:11 AM.