标题: #请教如何获取所有链接表的名称?# [打印本页] 作者: eio 时间: 2003-9-21 05:29 标题: #请教如何获取所有链接表的名称?# 不要显示本库的表啊。
(DAO_链接表_ODBC-相关文章技巧链接): 获取Access所有链接表的名称 作者: 竹笛 时间: 2003-9-21 06:24
Function fGetLinkPath(strTable As String) As String
Dim dbs As Database, stPath As String
Set dbs = CurrentDb()
On Error Resume Next
stPath = dbs.TableDefs(strTable).Connect
If stPath = "" Then
fGetLinkPath = vbNullString
'can change this to currentdb.name
Else
fGetLinkPath = right(stPath, Len(stPath) _
- (InStr(1, stPath, "DATABASE=") + 8))
End If
Set dbs = Nothing
End Function
Sub sListPath()
Dim loTd As TableDef
CurrentDb.TableDefs.Refresh
For Each loTd In CurrentDb.TableDefs
Debug.Print fGetLinkPath(loTd.Name)
Next loTd
Set loTd = Nothing
End Sub 作者: eio 时间: 2003-9-21 17:44
未知如何应用?作者: yrg13 时间: 2003-9-22 05:26
你邮箱多少,发一个给你。