PDA

View Full Version : Solved: Split field



boneKrusher
01-08-2007, 07:30 AM
Hi all,

I am in need of some help.

How do I split a field in MS Access using VBA?



c:temp\files\blah.pdf

I want the file name only.

"blah.pdf"

thanks for the help

boneKrusher
01-08-2007, 04:06 PM
I found it digging through the archives:


Function GetFileName(ByVal Path As String) As String
Dim sParts() As String
sParts = Split(Path, "\")
GetFileName = sParts(UBound(sParts))
End Function

andrew93
01-08-2007, 04:27 PM
[post deleted - you found the answer]