Retreive the server name and share

accessman2

Registered User.
Local time
Today, 07:54
Joined
Sep 15, 2005
Messages
335
Hi,

Suppose I have sharing drive, let's say "\\server1\sharefolder\Databases\db1.mdb"

if I run this CurrentProject.Path inside the database file, it will retreive the current path with drive letter, but how can I retreive the server, and sharefolder information?
 
(extra steps for clarity)
Code:
    Dim fsObject As New FileSystemObject
    Dim file As file
    Dim driveLetter As String
    Dim actualUNC As String
    
    Set file = fsObject.GetFile(CurrentProject.FullName)
    driveLetter = file.Drive
    actualUNC = Replace(CurrentProject.Path, driveLetter, file.Drive.ShareName)
 

Users who are viewing this thread

Back
Top Bottom