Re: last first

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: fredg (fgutkind_at_example.invalid)
Date: 08/04/04


Date: Wed, 04 Aug 2004 19:17:03 GMT

On Wed, 4 Aug 2004 11:39:24 -0700, robyn wrote:

> I am an end user, not programmer. The database list is
> set up for last, first. Suffix names have been deleted,
> i.e. sr., or III. How do I a) change to first last, and
> b) also put first and last into last.
>
> i.e. smith, rhonda should equal rhonda smith. Also I want
> rhonda in field first and smith in field last.
>
> If you could provide exact syntax for update query, that
> would be great, so I could copy it directly.

Actually, you shouldn't have both names stored in any one field,
whether its Last First or First Last.

You should have 2 separate fields in your table.
[FirstName] and [LastName].

Then you can create an update query to separate the names into the two
new fields.

Back up your table first.

Assuming ALL of the names are EXACTLY as you indicate above, i.e. one
Last Name separated by a comma and space from the First Name, you
could use:

Update YourTable Set YourTable.LastName =
Left([FullName],InStr([FullName],",")-1), YourTable.FirstName =
Mid([FullName],InStr([FullName],",")+2);

Change YourTable to whatever the actual table name is.

Then, when ever you need to display the full name, in a form, or
report, use an unbound text control. Set it's control source to:
=[FirstName] & " " & [LastName]

-- 
Fred
Please only reply to this newsgroup.
I do not reply to personal email.


Relevant Pages

  • Re: NHTSA to Test Lexus Belonging to Rhonda and Eddie Smith
    ... described by Rhonda Smith, what will Rhonda say? ... NHTSA paid $42,500 for the vehicle. ... It also took her six miles to get the car stopped! ... NHTSA to Test Lexus Belonging to Rhonda and Eddie Smith ...
    (alt.autos.toyota)
  • Re: Separating People
    ... you have discovered why you should always store names in separate ... You can modify your table to include a new "FirstName and LastName field, ... The common suggestion is to go ahead and run your update query, ... I am having a hard time figuring out how to modify ...
    (microsoft.public.access.queries)
  • Re: separtate first and last name in one column
    ... for example once I get the update query how do I ... My table first just had NAME column containing JOHN, SMITH ... >comma in every one, right?!) ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Separating People
    ... I have the separate name fields working, ... Smith) but at least it won't miss data. ... See VBA Help for more information on the string functions. ... I am having a hard time figuring out how to ...
    (microsoft.public.access.queries)
  • Re: NHTSA to Test Lexus Belonging to Rhonda and Eddie Smith
    ... So when the NHTSA engineers are unable to demonstarte the demonic ... behavior described by Rhonda Smith, ... NHTSA to Test Lexus Belonging to Rhonda and Eddie Smith ... Smiths' car will be studied at NHTSA Vehicle Research and Test ...
    (alt.autos.toyota)