file name from file path

mixup

Registered User.
Local time
Today, 04:36
Joined
Jul 29, 2005
Messages
34
If I have a file path name on a text box (say Text1) how can I get just the file name (with extension) in another text box (say Text2) without using any complicated functions... probably an expression in the control source.
 
= Right(Me.Text1, Len(Me.Text1) - InStrRev(Me.Text1, "\"))
 
RG: I tried it. In my main database, when I move to form view it says "#Name?" Then I tried a simple database with a similar browse control that I have, and tried it again. Still doesn't work. I am attaching that. Can you figure out, what am I doing wrong here? Thanks.
 
Last edited:
I put this under the cmdButton and it works just fine...
Code:
Private Sub Command1_Click()

Me!Text1 = LaunchCD(Me)
Me!Text2 = Right(Me.Text1, Len(Me.Text1) - InStrRev(Me.Text1, "\"))

End Sub
 
RG: The second time you have helped me out! I really like your simple solutions. Thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom