I would like to modify the following Access Basic code in Access 2.0
app so the [Segment] field would an automatic counter-type field.
Dim DefaultWorkspac e As WorkSpace, CurrentDatabase As Database
Dim MyTableDef As TableDef
Dim MyField As Field
Set DefaultWorkspac e = DBEngine.Worksp aces(0)
Set CurrentDatabase = DefaultWorkspac e.Databases(0)
Set MyTableDef = CurrentDatabase .CreateTableDef ("tblTempTable" )
Set MyField = MyTableDef.Crea teField("Segmen t", DB_LONG)
MyTableDef.Fiel ds.Append MyField
Set MyField = MyTableDef.Crea teField("Segmen tText", DB_MEMO)
MyTableDef.Fiel ds.Append MyField
CurrentDatabase .TableDefs.Appe nd MyTableDef
Can anyone tell me how to modify the above code so [Segment] will
be a counter field upon creation?