How to select the last characters in a text box (1 Viewer)

anb001

Registered User.
Local time
Today, 04:32
Joined
Jul 5, 2004
Messages
197
I was using below expression to combine three text boxes, into a third text box.

Code:
=[txtPathProcedures]+[txtProcNumber]+Right([txtURLPath];4)

The txtPathProcedures is a textbox containing the path for some files.
The txtProcNumber is containing the file name.
And finally txtURLPath is containing the path of an URL. And I thought I only needed the last four characters, which was a "." and a file extension, e.g. ".doc".

However, some files comes with other sizes file extension. Can I some how modify the expression, or perhaps use vba, so it will take everything after the last "." in the URL, so it doesn't matter if the file extension is ".doc", ".docx" or ".accdb".

Thanks.
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:32
Joined
Aug 30, 2003
Messages
36,140
Try the Mid() function with InStrRev() to find the last ".".
 

anb001

Registered User.
Local time
Today, 04:32
Joined
Jul 5, 2004
Messages
197
Excellent. Just what I needed. Thanks!
 

pbaldy

Wino Moderator
Staff member
Local time
Yesterday, 19:32
Joined
Aug 30, 2003
Messages
36,140
Happy to help!
 

Users who are viewing this thread

Top Bottom