Prase DB Path

Im trying to get the DB path but with out the db.mdb ex
\\Server\Folder\Access.mdb
how do i parse this to
\\Server\Folder\

when the access.mdb filename does change so need to go to first backslash
thaburnerAsked:
Who is Participating?
 
vinnyd79Connect With a Mentor Commented:
Dim DBFile As String, DBPath As String

DBFile = "\\Server\Folder\Access.mdb"

' Use InstrRev to get position of last "\" and then use Left Function
DBPath = Left$(DBFile, InStrRev(DBFile, "\"))

MsgBox DBPath
0
 
CarlWarnerCommented:
Isn't there a JUSTPATH function that can return that?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.