Function Datafil(Tabel)
On Error GoTo Fejl
Dim ResStr As String, DB As DAO.Database
Set DB = CurrentDb()
ResStr = DB.TableDefs(Tabel).Connect
If Left(ResStr, 4) = "ODBC" Then ResStr = " " & Left(ResStr, InStr(1, ResStr, "PWD=") - 2) & Right(ResStr, InStr(1, ResStr, "App=") - 1)
Datafil = Right(ResStr, Len(ResStr) - 10)
Fejl_Exit:
Exit Function
Fejl:
'MsgBox Err.Description, , "YrAppName"
Resume Fejl_Exit
End Function
Solution 2:
SELECT MSysObjects.Connect, MSysObjects.Database, MSysObjects.ForeignName, MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=4 Or (MSysObjects.Type)=6));
Herman
They say that crime doesn't pay... does that mean my job is a crime?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.