Seperate a field

J

Jessie

Hello.

I get records from a client in a whole name field, but
have to return the name to them in two fields (First &
last).

Is there a way to seperate the first and last name based
off of the space in the middile?

Thanks for any help.

Jessie
 
C

Cheryl Fischer

Sure.

FirstName: Left([WholeName], InStr([WholeName], " ") -1)

LastName: Mid([WholeName], InStr([WholeName], " ") +1)

hth,
 
E

Eric Nelson

There exist names with required spaces in them (e.g. Mac
Donald). I'd suggest you follow Cheryl's suggestion, but
THEN check to see if any names still contain spaces.
You'll either have to fix them manually or invent another
solution.

Eric

-----Original Message-----
Sure.

FirstName: Left([WholeName], InStr([WholeName], " ") -1)

LastName: Mid([WholeName], InStr([WholeName], " ") +1)

hth,

--
Cheryl Fischer
Law/Sys Associates
Houston, TX

Hello.

I get records from a client in a whole name field, but
have to return the name to them in two fields (First &
last).

Is there a way to seperate the first and last name based
off of the space in the middile?

Thanks for any help.

Jessie


.
 
Top