Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Description for Access database field

Status
Not open for further replies.

lrfcbabe

Programmer
Jul 19, 2001
108
US
With OutTD
.Fields.Append .CreateField("Line", dbText, 5)
.Fields.Append .CreateField("Designation", dbText, 100)
.Fields.Append .CreateField("GORD", dbDouble)
.Fields.Append .CreateField("ReBegPlus", dbDouble)

These are a few of the fields I create in the table. When I open the table in Access in the design view of course there is no Descriptions for any of the fields. How do add a Description for these fields when I create the table using VB6? Is the Description a property? I assign properties to other fields.

Set prpfield = OutTD.Fields("dblSize")
Set prop = prpfield.CreateProperty("DecimalPlaces", dbByte, 3)
prpfield.Properties.Append prop

Thanks
 
Heck I just answered my own question. I tried it and it worked. It is a property.

Set OutDB = OutWS.CreateDatabase(strTargetAccessFile, dbLangGeneral, dbVersion40)
Set OutTD = OutDB.CreateTableDef("CompletePipe")
With OutTD
.Fields.Append .CreateField("Line", dbText, 5)
.
.
End With
OutDB.TableDefs.Append OutTD

Set prpfield = OutTD.Fields("Line")
Set prop = prpfield.CreateProperty("Description", dbText, "Application-Pipeline, EED field-line_id")
prpfield.Properties.Append prop

Set OutRS = OutDB.OpenRecordset("CompletePipe", dbOpenTable)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top