Noname > 28-08-10, 11:44 AM
Function GetAppPath() As String
On Error Resume Next
Dim DBName As String
Dim DBPath As String
Dim intCurrVal As Integer
Dim intLastPosition As Integer
DBName = CurrentDb.Name
intCurrVal = InStr(DBName, "\")
Do Until intCurrVal = 0
intLastPosition = intCurrVal
intCurrVal = InStr(intLastPosition + 1, DBName, "\")
Loop
DBPath = left(DBName, intLastPosition)
GetAppPath = DBPath
End Function
echippro > 11-09-12, 10:14 PM