Type mismatch when trying to split names

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I found the code and tried using it to split a first name and last name. I
am using this is a select query.

Can someone get me started?

[mgr] is text

Thanks


Ex: John Smith FName = John LName = Smith

FName: Left([mgr],InStr([mgr]," ")-1)
LName: Right([mgr],InStr([mgr]," ")+1)
 
Dear Dave:

I recommend one change:

LName: Mid([mgr],InStr([mgr]," ")+1)

Also, if anyone ever enters a name with no space in it, you've got a
problem there, too.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top