Add Field Descriptions, New Table

B

Bob

I use Office XP Developer with W2K.

We are currently working on a questionnaire database. We paste field
descriptions from a Word document into the description, but this is not
fun - there are hundreds of questions...

Below p/o the code used to create the new table. What is the syntax to add
descriptions for each field?

Sub CreateTable()

Dim tbl As New Table
Dim cat As New ADOX.Catalog

'Open the catalog.
cat.ActiveConnection = _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\My Documents\HIA\HIA_be.mdb"

tbl.Name = "tblHIA03"

tbl.Columns.Append "HIA03Q1", adVarWChar, 25 ' Person reporting
information
tbl.Columns.Append "HIA03Q2", adVarWChar, 25 ' Other (SPECIFY
RELATIONSHIP)
cat.Tables.Append tbl


End Sub

Thanks for looking.

Bob
 

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