|
-
Nov 15th, 1999, 09:16 PM
#1
Thread Starter
Junior Member
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.
-
Nov 15th, 1999, 09:40 PM
#2
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|