I have only three tables (two Access tables and one linked Sybase table), but when I loop through table name, it loops through so many crazy table names.
Intention of code: I use acLink to like a Sybase table(this is one time only code), but need the code to Refresh the table when opening the Access file again.
Thanks.
Code:Dim AccessDB As dao.Database Dim Tbl As TableDef ...... ...... Set AccessDB = CurrentDb ...... ...... For Each Tbl In AccessDB.TableDefs If Tbl.Name = "Test_RecordT" Then Tbl.Connect = "ODBC;DSN=ABC;UID=" & Username & ";PWD=" & Password & ";LANGUAGE=us_english;DATABASE=XYZ" Tbl.RefreshLink 'Relink the table End If Next Tbl


Where are these Access table names come from?
Reply With Quote


