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
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