Hyperlink or Memo?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top