linked table manager not working

G

Guest

I have a linked db and I want to change data sources. In earlier versions,
the linked table manager took care of this. When I go to linked table
manager in this new db, nothing shows up under link table manager??????? I
have 30 tables linked to my home odbc source and I want to change it to a
work odbc source.
Thanks,
 
M

[MVP] S.Clark

Private Function RefreshLinks(strFileName As String) As Boolean
' Refresh links to the supplied database. Return True if successful.

Dim dbs As Database
Dim intCount As Integer
Dim tdf As TableDef

' Loop through all tables in the database.
Set dbs = CurrentDb
For intCount = 0 To dbs.TableDefs.Count - 1
Set tdf = dbs.TableDefs(intCount)

' If the table has a connect string, it's a linked table.
If Len(tdf.Connect) > 0 Then
tdf.Connect = ";DATABASE=" & strFileName
Err = 0
On Error Resume Next
tdf.RefreshLink ' Relink the table.
If Err <> 0 Then
RefreshLinks = False
Exit Function
End If
End If
Next intCount

RefreshLinks = True ' Relinking complete.

End Function
 
D

dbahooker

MDB is a piece of crap technology; and you should be using Access Data
Projects.
i mean-- for real; aren't you kids tired of linking and refreshing and
crap like that?

keep all your queries and tables in one place with access data
projects; and you'll have much better performance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top