I have the following function:
Function GetFieldNames(table As String) As Integer
Dim db As DAO.Database
Dim tdfTable As DAO.TableDef
Dim fldField As DAO.Field
Set db = CurrentDb()
Set tdfTable = db.TableDefs(table)
For Each fldField In tdfTable.Fields
Debug.Print fldField.Name
Next fldField
End Function
How do I get the data type and field size to print? I need a create table script to recreate the table structure in a SQL db. Any help would be appreciated.




