Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Table Manager Error Message! 1

Status
Not open for further replies.

GCam

Programmer
May 30, 2001
6
0
0
CA
When I tried to refresh the link to a DB2 table using the Linked Table Manager in Access 97, I received the following Error Message...

"Invalid Procedure Call or Argument"

The message occurs before the Linked Table Manager window is displayed on the screen, and does not allow me to check off any tables.

I have looked through the help, but was unable to find anything. Any help on fixing this problem without having to re-install Access would be greatly appreciated.

Thanks in advance.
 
The linked table manager is an add in. And one of the *.mda files, but I don't know which.

However, you don't need it. To see your links:

Code:
Private Sub ListLinks()
Dim dbs as database
Dim y as integer
Dim dbs as database
Set dbs = currentdb()
For y = 0 to dbs.tabledefs.count - 1
If DBSDatabase.TableDefs(z).Connect = "" Then
Else
     msgbox DBSDatabase.TableDefs(y).Connect
End If
Set dbs = nothing
End Sub

To change the link:

Privare Sub ChangeLink()
Dim dbs as database
Set dbs = currentdb()
dbs.tabledefs(index or name here).connect = "path/name"
dbs.tabledefs(index or name here).TableSOurce = "TableName"
Set DBS = nothing
End Sub

[/Code]

You can also use the Refresh method of the tabledef object

 
Thanks Databaseguy! (a star is on it's way)

I had to modify your code, as there was some errors when I tried to run it. I also changed the output to the debug window rather than a message box. My modifications are below in case anyone else would need to run it.

Private Sub ListLinks()
Dim dbs As Database
Dim y As Integer
Set dbs = CurrentDb()
For y = 0 To dbs.TableDefs.Count - 1
If dbs.TableDefs(y).Connect = "" Then
Else
Debug.Print dbs.TableDefs(y).Name; Tab; dbs.TableDefs(y).Connect
End If
Next
Set dbs = Nothing
End Sub

I also found the following article regarding the problem.


-GCam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top