Splitting a field

A

Alex

Hi

i have a field in the following format 'Surname, Forename'.

I want to split this info two fields - which is the best way of doing this
please./

Tks
A
 
J

John Spencer

Best way??? I don't know.

One method is to use the Instr function along with Left and Mid

Assumption: the field always has one comma in it

Field: Surname: Trim(Left([TheField],Instr(1,[TheField],",")-1))

Field: ForeName: Trim(Mid([TheField],Instr(1,[TheField],",")+1))

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

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