Public Function GetPathToFE() As String
' Extract Path from :-
'V:\SYSTEMS\NOSYSTEM.MDB
' Reversing the string and find the first occurence of '/'
Dim strReversedName As String, strName As String
Dim strChar As String * 1
Dim intI As Integer, intLength As Integer
strName = CurrentDb.Name
intLength = Len(strName)
strReversedName = ""
For intI = intLength To 1 Step -1
strChar = Mid(strName, intI, 1)
strReversedName = strReversedName & strChar
Next
intI = InStr(1, strReversedName, "\")
If intI > 0 Then
GetPathToFE = Left(strName, intLength - intI)
Else
GetPathToFE = strName
End If
End Function