Hi Gord, I knew this would be a difficult one to work out! Maybe there is an easier way. I have a folder which is called "Progs", she contains various subfolders, one of which is called "Cont", she contains a front end or mdb called "Control". I'm able to return value or full path of "control" by using the following Module:
Function ap_LastInStr(strSearched As String, strSought As String) As Integer
Dim intCurrVal As Integer, intLastPosition As Integer
intCurrVal = InStr(strSearched, strSought)
Do Until intCurrVal = 0
intLastPosition = intCurrVal
intCurrVal = InStr(intLastPosition + 1, strSearched, strSought)
Loop
ap_LastInStr = intLastPosition
End Function
On a from I am able to return the full path to "Text84" by applying the following a button:
Dim dbs As Database
Dim ruta As String
Dim REtVal As String
On Error GoTo Err_Comd
Set dbs = CurrentDb()
'obtener ruta front end
ruta = Left$(dbs.NAME, ap_LastInStr(dbs.NAME, "\"

)
Me.Text84 = ruta
Err_Exit:
Exit Sub
Err_Comd:
MsgBox Err.Description
GoTo Err_Exit
Gord, this goes a little too far as it goes right up to the name of the subfolder. If a can get the path only as far as
: "C:\Program files\Progs\" instead of "C:\Program files\Progs\Cont\". This way I can control all the front ends inside "Progs". I hope you can understand what I'm trying to explain.
Cheers
Peps