G
Graham M Haines
Is it possible to add the field description when creating Fields using the
Create Fields Method. I am creating a series of tables, where the field
information is taken from a table:
TABLE NAME FIELD NAME FIELD DESCRIPTION
FIELD LENGTH FIELD TYPE
Institution INSTAPP Indicator for HEFCE funding
approximations 2 dbinteger
Institution RECID Record type indicator
10 dbtext
Institution UKPRN UK Provider Reference Number
20 dbtext
I can specify all the details using the Fields.Append.CreateFields using
variables as below, but I would also like to add in the field descriptions
to the tables as well.
. . . . .
Set tdf = mdb.CreateTableDef(strtablename)
With rst1
For intcnt = 1 To intreccnt
.Move intmov1
intmov1 = 1
strfieldname = ![FIELD NAME]
With tdf
.Fields.Append .CreateField(strfieldname, strtype, intfldsize)
End With
Next intcnt
End With
mdb.TableDefs.Append tdf
--
Regards
Graham
Graham Haines
Create Fields Method. I am creating a series of tables, where the field
information is taken from a table:
TABLE NAME FIELD NAME FIELD DESCRIPTION
FIELD LENGTH FIELD TYPE
Institution INSTAPP Indicator for HEFCE funding
approximations 2 dbinteger
Institution RECID Record type indicator
10 dbtext
Institution UKPRN UK Provider Reference Number
20 dbtext
I can specify all the details using the Fields.Append.CreateFields using
variables as below, but I would also like to add in the field descriptions
to the tables as well.
. . . . .
Set tdf = mdb.CreateTableDef(strtablename)
With rst1
For intcnt = 1 To intreccnt
.Move intmov1
intmov1 = 1
strfieldname = ![FIELD NAME]
With tdf
.Fields.Append .CreateField(strfieldname, strtype, intfldsize)
End With
Next intcnt
End With
mdb.TableDefs.Append tdf
--
Regards
Graham
Graham Haines