Adding a field to an existing table via a module

D

Deece

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
 
A

Alex Dybenko

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
 

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