functions

maxmangion

AWF VIP
Local time
Today, 21:33
Joined
Feb 26, 2003
Messages
2,805
i have the following line:

Me.Text2 = Right(Me.Text0, InStr(1, Me.Text0, ".") - 1)

and i would like that if Text0 is "test.exe" i want to return "exe", however, with the above i am getting ".exe" ... can someone tell me what i am doing wrong please ?

Thanks
 
if i try test it will return the first part "test" as expected.

Any suggestions, what i may have wrong please ?

Thank You
 
You are finding how far the "." is from the left then comming in that far from the right :) Try:-
Me.Text2 = Right(Me.Text0, Len(Me.Text0) - InStr(1, Me.Text0, "."))

Peter
 

Users who are viewing this thread

Back
Top Bottom