D
dlb1228
i got this code off of this site to give me a list of the table names and
fields in my database. When i run the code in the immediate window it starts
maybe in the middle of my tables and lists them, it doesnt give me all my
tables. Any idea why? and is there a way to make a table of this data?
Public Sub GetFieldNames()
Dim dbs As Database, tdf As TableDef, fld As Field
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
If Left(tdf.Name, 4) <> "MSYS" Then
Debug.Print tdf.Name
For Each fld In tdf.Fields
Debug.Print " " & fld.Name
Next fld
End If
Next tdf
Set dbs = Nothing
End Sub
fields in my database. When i run the code in the immediate window it starts
maybe in the middle of my tables and lists them, it doesnt give me all my
tables. Any idea why? and is there a way to make a table of this data?
Public Sub GetFieldNames()
Dim dbs As Database, tdf As TableDef, fld As Field
Set dbs = CurrentDb
For Each tdf In dbs.TableDefs
If Left(tdf.Name, 4) <> "MSYS" Then
Debug.Print tdf.Name
For Each fld In tdf.Fields
Debug.Print " " & fld.Name
Next fld
End If
Next tdf
Set dbs = Nothing
End Sub