Spliting names into 2 fields

D

David

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

Jeff Boyce

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>
 
O

Ofer

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
 
J

Jeff Boyce

?!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
 
Top