I have this code here which will get me the table names that are local..
but since ive split my database it will not populate them...does anyone know a way to pull the names of all linked tables?
Code:
Dim strSQL As String
Dim lst As ListBox
Set lst = Me![YearsList]
strSQL = "SELECT [Name] FROM MsysObjects " & _
"WHERE (([Type] = 1) AND ([Name] Not Like '~*') AND ([Name] Not Like 'MSys*') AND ([Name] Not Like 'Branches') AND ([Name] Not Like 'CurrentVariables') AND ([Name] Not Like 'CO-Main') AND ([Name] Not Like 'COMain') AND ([Name] Not Like 'Employee') AND ([Name] Not Like 'Training') AND ([Name] Not Like 'TrainingTitles') AND ([Name] Not Like 'TrainingUpload') AND ([Name] Not Like '441-Main') AND (Left$([Name], 5) = '" & branchsub & "') " & _
"AND ([Name] Not Like 'Parts') AND ([Name] Not Like 'POMain')AND ([Name] Not Like 'Users') AND ([Name] Not Like 'Years')AND ([Name] Not Like 'f_D45D44BBAA584A60B80EACD979B58087_Data') AND ([Name] Not Like 'WBTTitle') AND ([Name] Not Like 'TrainingEvents') AND ([Name] Not Like 'PayCards')) ORDER BY [Name];"
lst.RowSourceType = "Table/Query"
lst.RowSource = strSQL
but since ive split my database it will not populate them...does anyone know a way to pull the names of all linked tables?