B
BruceS
Hi, everyone.
I'm building a routine in A2002 that loads the field name and field type of
a linked table into a local table for later use.
My problem: Both Memo and Hyperlink are returning Field.Type of 12. Short
of examining the data at the same time I build the list (which I'd rather do
later), how can I differentiate between the two types?
Here is the code:
Dim dbLinked as Database
Dim tdf as TableDef
Dim fld as Field
....
Set dbLinked = OpenDatabase(Me.jobDatabase, , True)
....
Set tdf = dbLinked.TableDefs(Me.cboDataSource)
For Each fld In tdf.Fields
mySQL = "INSERT INTO tblColumns " & _
"( jobNum, fldName, colHeading, fldType ) " & _
"SELECT " & Me.jobNum & ", '" & _
fld.Name & "', '" & fld.Name & "', " & fld.Type & ";"
DBEngine(0)(0).Execute mySQL, dbFailOnError
Next fld
Set fld = Nothing
Set tdf = Nothing
....
Thanks,
Bruce
I'm building a routine in A2002 that loads the field name and field type of
a linked table into a local table for later use.
My problem: Both Memo and Hyperlink are returning Field.Type of 12. Short
of examining the data at the same time I build the list (which I'd rather do
later), how can I differentiate between the two types?
Here is the code:
Dim dbLinked as Database
Dim tdf as TableDef
Dim fld as Field
....
Set dbLinked = OpenDatabase(Me.jobDatabase, , True)
....
Set tdf = dbLinked.TableDefs(Me.cboDataSource)
For Each fld In tdf.Fields
mySQL = "INSERT INTO tblColumns " & _
"( jobNum, fldName, colHeading, fldType ) " & _
"SELECT " & Me.jobNum & ", '" & _
fld.Name & "', '" & fld.Name & "', " & fld.Type & ";"
DBEngine(0)(0).Execute mySQL, dbFailOnError
Next fld
Set fld = Nothing
Set tdf = Nothing
....
Thanks,
Bruce