tabledefs and linked tables

M

mcourter

how can i get this code to include linked tables?

For i = 0 To dbs.TableDefs.Count - 1
If dbs.TableDefs(i).Attributes = 0 Then
cbxChooseTable.AddItem dbs.TableDefs(i).Name
End If
Next i
 
M

mcourter

i modified this way and it works:

Or dbs.TableDefs(i).Attributes = 1073741824

i want to skip over sys files.
is there a better way (besides using instr)?
 
D

Douglas J. Steele

For i = 0 To dbs.TableDefs.Count - 1
If (dbs.TableDefs(i).Attributes And dbSystemObject) = 0 Then
cbxChooseTable.AddItem dbs.TableDefs(i).Name
End If
Next i
 
Top