Create a new DAO.Index object, set its properties and then append it to the Indexes collection.

Code:
Set fld = tdf.CreateField("ID, dbLong)
fld.Attributes = dbAutoIncrField
tdf.Fields.Append fld

Dim idx As DAO.Index

Set idx = New DAO.Index
idx.Name = "PK_Testing"
idx.Fields.Append fld
idx.Primary = True

tdf.Indexes.Append idx