UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Parse String Backend To Specific Character, Any Version    
 
   
sarcher
post Mar 2 2018, 08:45 AM
Post#1



Posts: 19
Joined: 30-November 12



in a query how do i parse and grab a back end of a string to a certain character?

example:

E:/MyFolder/Data/Testexample.doc

I just needs the "Textexample.doc"

TIA
Steve
Go to the top of the page
 
zaxbat
post Mar 2 2018, 08:49 AM
Post#2



Posts: 934
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


I have never used this function.....but looks like it will work...

https://www.techonthenet.com/access/functio...ng/instrrev.php

It is an instr function that works in reverse....so, sounds pretty simple

--------------------
Kindest regards, and Cheers!
ZAX

A picture is worth a thousand words and a zipped DB is worth a thousand pictures.
Oh, and....please don't disappear into the Twilight Zone.... Holler back with your results!
Go to the top of the page
 
sarcher
post Mar 2 2018, 09:13 AM
Post#3



Posts: 19
Joined: 30-November 12



Thanks for the insight -

I got this to work

Doc: Right([DOCLOC],Len([DOCLOC])-InStrRev([DOCLOC],"\"))

TIA
Steve
Go to the top of the page
 
zaxbat
post Mar 2 2018, 10:19 AM
Post#4



Posts: 934
Joined: 26-January 06
From: .....the wiregrass (either you know or you don't)


Cool Beans!
Cheers!

--------------------
Kindest regards, and Cheers!
ZAX

A picture is worth a thousand words and a zipped DB is worth a thousand pictures.
Oh, and....please don't disappear into the Twilight Zone.... Holler back with your results!
Go to the top of the page
 
John Vinson
post Mar 2 2018, 07:57 PM
Post#5


UtterAccess VIP
Posts: 4,234
Joined: 6-January 07
From: Parma, Idaho, US


Even simpler:

Mid([DOCLOC],InStrRev([DOCLOC],"\")+1)

The Mid() function gets a substring of its argument - e.g. Mid("abcdefghi", 3, 3) is "cde"; but if you leave off the optional third length argument it returns the rest of the string: Mid("abcdefghi", 3) returns "cdefghi".

--------------------
John W. Vinson
Wysard of Information
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    21st June 2018 - 02:27 PM