Another trim problem

G

Golfinray

I have 250 school districts in my district field. All of them say Jones
School District or Smith School District. I want to return just the Jones or
Smith and not the school district. Thanks, so much!!!
 
E

Evi

Use Instr to find the space then Left to get the name string

InStr([DistName], " ") finds the space so

Left([DistName, InStr([DistName], " ")-1)
Evi
 
K

KARL DEWEY

If the name is William F. Smith School District then you need something
different.
What about Replace([YourFieldName], " School District", "")
--
KARL DEWEY
Build a little - Test a little


Evi said:
Use Instr to find the space then Left to get the name string

InStr([DistName], " ") finds the space so

Left([DistName, InStr([DistName], " ")-1)
Evi
Golfinray said:
I have 250 school districts in my district field. All of them say Jones
School District or Smith School District. I want to return just the Jones or
Smith and not the school district. Thanks, so much!!!
 
Top