Re: shorten path length

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



In article <B39A71E5-68B4-4E69-BFFF-7CC9BDBA8C8E@xxxxxxxxxxxxx>,
Andrew K <AndrewK@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

In a view filtered for external successors, I want to display only the file
name and task instead of, e.g., \\file01\Groups\FMS3_Shared\PMO\Staging\03C
DOE FMS3-FAMIS Integr.mpp\217. Mid("[Successors]",52) with or without quotes
in a text field doesn't work. Am I mis-using Mid, or is there another way?

Andrew,
Yeah, you are misusing the Mid Function. First of all, do not include
the quotes. Second, you have told it to start at character 52, which if
I count correctly, is somewhere in the "...FMS3..." part of the overall
string.

Try using a combination of the Left, Instr, and Mid Functions, or the
InStrRev and Mid Functions. For example, using the latter syntax and
assuming that you only have a single external successor, the formula
would be:
FilNam=Mid([successors],InStrRev([successors],"\")+1)

Hope this helps.
John
Project MVP
.



Relevant Pages