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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting description of field in an access 2000 database

Status
Not open for further replies.

barryna

Programmer
Feb 15, 2002
111
US
How do you set the description of a field in an access 2000 database when creating a new table using DAO? I think the code is something like:

fld.Properties("Description") = "ID of the animal"

but that does not work. Any help would be great!

Here is some of my code:

Set td = New TableDef
td.Name = "tblTreatments"

Set fld = td.CreateField("Index", 4)
fld.Attributes = dbAutoIncrField
td.Fields.Append fld
Set fld = Nothing

Set fld = td.CreateField("AnimalID", dbText, "30")
fld.Properties("Description") = "ID of the animal" 'does not work!
td.Fields.Append fld
Set fld = Nothing

db.TableDefs.Append td
Set td = Nothing

db.Execute "CREATE INDEX AnimalID ON tblTreatments (AnimalID)"



Nick

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top