Right Function with InStr

  • Thread starter Thread starter SurveyorinVA via AccessMonster.com
  • Start date Start date
S

SurveyorinVA via AccessMonster.com

Hello,

I have the following text string in a text box Path1:
P:\Projects\059401.00\survey\Fnotes\09-11-07\Crew 1\SR3-091107.crd

I would like to return the following as MyText: SR3-091107.crd

I am trying to use this
MyText = right(Me.path1, Len(Me.path1) - InStr(Me.path1, "\") - 1) but is not
returning the string.

I know that the InStr evaluates from the Left, but is there a function to
evaluate to a certain character is reached from the right?

Any help or points in the right direction would be greatly appreciated.

Thank You in advance,
Chris
 
Better to use the Mid function for this:

Me.MyText = mid(Me.path1,instrrev(Me.path1,"\")+1)
 

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

Back
Top