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

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

Similar Threads

IIF or Len Statement Help 3
Query Help 3
sql query won't work 3
Query Problem Help! 4
Query Help Needed! 3
IFF Function help please 5
Linked Fields not populating 2
Using an or in my join 2

Top