|
-
Sep 1st, 1999, 05:28 PM
#1
Thread Starter
New Member
How do I make my field to a primary key?
here is my code:
Dim myDataBase As Database
Dim myTable As TableDef
Dim myField As field
Set myDataBase = OpenDatabase("c:\Data.mdb")
Set myTable = myDataBase.CreateTableDef("table")
'this the field I want to be the primary key
Set myField = myTable.CreateField("ID", dbLong)
myTable.Fields.Append myField
myDataBase.TableDefs.Append myTable
Thanks
Xavier
------------------
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
|