Adding a field to an existing table via a module

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to add a field to an existing table via a module as part of an
application. I am a new VB user and am unsure of the sytax to use. Can
anyone help.

Thanks
 
Here a code snipset:

dbsData.TableDefs.Refresh
Set tdf = dbsData.TableDefs("MyTable")
Set fld = tdf.CreateField("NewField", dbText, 50)
tdf.fields.Append fld
Set tdf = Nothing
HTH
 
Back
Top