Re: splitting a field

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Steve Schapel (schapel_at_mvps.org.ns)
Date: 12/12/04


Date: Mon, 13 Dec 2004 07:11:42 +1300

Tgl,

Mid([Full Name],InStrRev([Full Name]," ")+1)

(assumes the LastName does not contain a space, i.e. this will not work
for Joe Di Maggio)

-- 
Steve Schapel, Microsoft Access MVP
tgl wrote:
> I have a database including full name:
> prefix firstname middlename lastname 
> 
> some fields have a prefix and/or middlename some do not.  
> How can i pull out just lastname
> 
> i assume it's some variation on right() and instr() but can't seem to do it.
> 


Relevant Pages

  • Re: splitting a field
    ... > Steve Schapel, Microsoft Access MVP ... > tgl wrote: ... >> prefix firstname middlename lastname ...
    (microsoft.public.access.queries)
  • Re: Name parsing routine
    ... I'm always interested in learning new things, Tony. ... 'Joe Anderson ... FirstName MiddleName Lastname ... Prefix FirstName MiddleName LastName ...
    (microsoft.public.vb.general.discussion)
  • Re: UI Question: Protecting Critical Delete?
    ... I don't prefix variables either. ... such naming conventions are no ... meta data that is easily available. ... Rick Brandt, Microsoft Access MVP ...
    (comp.databases.ms-access)
  • Re: Name parsing routine
    ... Tony Proctor ... 'Joe Anderson ... FirstName MiddleName Lastname ... Prefix FirstName and/& SecFirstName MiddleName LastName 'Mr. Joe & ...
    (microsoft.public.vb.general.discussion)
  • splitting a field
    ... I have a database including full name: ... some fields have a prefix and/or middlename some do not. ... How can i pull out just lastname ...
    (microsoft.public.access.queries)