K
Kahuna
This is pretty ridiculous but here I am again stuck with the most basic of
tasks!!!
I need to add a field to an already existing external database.
Here's my code to do this:
Set tdfCompTableName =
dbComp.TableDefs([TableName])
With tdfCompTableName
.Fields.Append
..CreateField(strFieldNameToAdd, varFieldTypeToAdd)
End With
dbComp.TableDefs.Append tdfCompTableName
What I get:
The code assumes that 'TableName' is a field rather than a table. How do I
refer to the table to open it ready to append fields??? Seems easy when
creating a new TableDef but less so when referring to an already existing
Table.
Help appreciated.
tasks!!!
I need to add a field to an already existing external database.
Here's my code to do this:
Set tdfCompTableName =
dbComp.TableDefs([TableName])
With tdfCompTableName
.Fields.Append
..CreateField(strFieldNameToAdd, varFieldTypeToAdd)
End With
dbComp.TableDefs.Append tdfCompTableName
What I get:
The code assumes that 'TableName' is a field rather than a table. How do I
refer to the table to open it ready to append fields??? Seems easy when
creating a new TableDef but less so when referring to an already existing
Table.
Help appreciated.