hi guys, i am trying to list all the tables in my database and then all the fields within each one, which i have managed to do with the code below:
but how do i add the field type at the moment it shows a number which represents the data type ( ie, number / text / etc ) and i want it to show, 'autonumber' / 'text' / 'date' etc and i would also like to display the comment relating to each field.
any ideas?
Code:
Dim db As Database
Set db = DBEngine.Workspaces(0).Databases(0)
For i = 0 To db.TableDefs.Count - 1
If db.TableDefs(i).Connect <> "" Then
Debug.Print db.TableDefs(i).name
For x = 0 To db.TableDefs(i).Fields.Count - 1
Debug.Print " " & db.TableDefs(i).Fields(x).name & " - " & db.TableDefs(i).Fields(x).Type
Next
End If
Next
but how do i add the field type at the moment it shows a number which represents the data type ( ie, number / text / etc ) and i want it to show, 'autonumber' / 'text' / 'date' etc and i would also like to display the comment relating to each field.
any ideas?