Prase DB Path

Posted on 2005-04-21
Last Modified: 2010-04-17
Im trying to get the DB path but with out the db.mdb ex
how do i parse this to

when the access.mdb filename does change so need to go to first backslash
Question by:thaburner
    LVL 33

    Expert Comment

    Isn't there a JUSTPATH function that can return that?
    LVL 28

    Accepted Solution

    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

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    tripleUp challenge 7 54
    seriesUp challenge 7 81
    Enhanced For loop vs ForEach Loop 4 42
    wordappend challenge 8 49
    Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now