-
Hello dear VB programmers,
I made the following line
With tdfNew
.Fields.Append .CreateField("Plant", dbText)
End With
How can I create a primary key in this line.
Where can I find other types (Autonumber / YesNO / etc) in the help of VB5
Nice greetings
Ingrid.
-
Try it:
------------------
Dim Idx As Index
Set Idx = tdfNew.CreateIndex("PrimaryKey")
With Idx
.Primary = True
.Required = True
.Ignorenulls = False
.Fields.Append .CreateField("Field1")
End With
tdfNew.Indexes.Append Idx
tdfNew.Indexes.Refresh
------------------
smalig
[email protected]
smalig.tripod.com