?
Solved

Prase DB Path

Posted on 2005-04-21
2
Medium Priority
?
164 Views
Last Modified: 2010-04-17
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
0
Comment
Question by:thaburner
2 Comments
 
LVL 33

Expert Comment

by:CarlWarner
ID: 13839151
Isn't there a JUSTPATH function that can return that?
0
 
LVL 28

Accepted Solution

by:
vinnyd79 earned 500 total points
ID: 13839836
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

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Simple Linear Regression

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question