Simple Expression, Need Help

adam.greer

Registered User.
Local time
Today, 13:58
Joined
Apr 27, 2006
Messages
43
Hi guys

I need to trim a section of text in a field in my DB. I'm currently using the following expression.

(Left(Mid([filename],InStrRev([filename],"\")),InStrRev(Mid([filename],InStrRev([filename],"\")),"")))

Which turns

D:\Broadcast\Music\A-C\Artcha\Artcha - Artcha - 1 - Hustle And Flow.mp3

Into

\Artcha - Artcha - 1 - Hustle And Flow.mp3

Now things have changed in the DB and and I need the query to return

\Artcha\Artcha - Artcha - 1 - Hustle And Flow.mp3

But when I change the query I can't get the expression to return it.

What am I doing wrong?

Thanks
 
Try this:

Right([filename], Len([filename]) - InStrRev([filename], "\", InStrRev([filename], "\") - 1) + 1)
 
Works great, thanks alot man.
 

Users who are viewing this thread

Back
Top Bottom