Spliting names into 2 fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I split a first name from a surname in a file that I have imported?
An example is david,sweeney
 
David

Take a look at the Left(), Mid() and Instr() functions. Generically, you'd
use a query and these functions to "find" the comma and take everything on
the left, before the comma, and everything following the comma.

Regards

Jeff Boyce
<Access MVP>
 
Another way will be to you the split function, to split between the two fields

=Split([fieldName],",")(0) will return the first name
=Split([fieldName],",")(1) will return the second name
 
?!Thanks!?

I'm so used to "rolling my own" I hadn't even discovered the Split()
function!

Regards

Jeff Boyce
<Access MVP>

Ofer said:
Another way will be to you the split function, to split between the two fields

=Split([fieldName],",")(0) will return the first name
=Split([fieldName],",")(1) will return the second name

David said:
How can I split a first name from a surname in a file that I have imported?
An example is david,sweeney
 

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

Back
Top