Get string right after . . .

J

JT

I need to get string right after "\".
For example if i have this path name
c:\Docs\Year\Months\June2007.txt
then i need get this string
June2007.txt

I used this

File Name: Left([Table1]![FileNm],InStrRev([Table1]![FileNm],"\")-1)

but it will remove that string i need.
Please help.
Thanks.
 
F

fredg

I need to get string right after "\".
For example if i have this path name
c:\Docs\Year\Months\June2007.txt
then i need get this string
June2007.txt

I used this

File Name: Left([Table1]![FileNm],InStrRev([Table1]![FileNm],"\")-1)

but it will remove that string i need.
Please help.
Thanks.

FileName:Mid([FileNum],InStrRev([FileNum],"\")+1)
 
J

JT

Thank you so much it works perfectly.
It trims before last "\". Exactly way i want.
Thank you.

Jason Lepack said:
Untested:
RIGHT([FileNm], LEN([FileNm]) - InStrRev([FileNm],"\"))

I need to get string right after "\".
For example if i have this path name
c:\Docs\Year\Months\June2007.txt
then i need get this string
June2007.txt

I used this

File Name: Left([Table1]![FileNm],InStrRev([Table1]![FileNm],"\")-1)

but it will remove that string i need.
Please help.
Thanks.
 

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

Top