Another trim problem

  • Thread starter Thread starter Golfinray
  • Start date Start date
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!!!
 
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
 
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

Query Help 3
IIF or Len Statement Help 3
Query Problem Help! 4
sql query won't work 3
Problem with percentages 2
Query Help Needed! 3
IFF Function help please 5
Count if Populated 15

Back
Top