MS Access Filter question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column that gives me the results;

/dir/dir/customer name

I want to filter out the /dir/dir/ so the column results just show the
customer name, I think a substr() might work but I am not sure how the syntax
would look.

Any suggestions?
 
Use InstrRev() to find the last / in the string.
Then use Mid() to get the remainder from there.

(You can also use Dir() around the file name to lose the path.)
 
Try using InStrRev in conjunction with the Mid function

Mid(YourField,Instrrev(YourField & "","/")+1)

I've added the zero length string to the field for the InStrRev function in
case YourField is ever null. Null values would generate an error.
--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
Back
Top