Forum Discussion
RoyLehmann
Jun 11, 2022Copper Contributor
Tabledef Indexes Append
Procedure compiles correctly but gives the following error: Run time error 3409 Invalid field definition "PrimaryIndex" in definition of index. Instruction flagged: tdfMenu.Indexes.Append idxPrim...
- Jun 12, 2022you don't have "PrimaryIndex" field name when you created the Table.
you select from the table field which one is the Field you are Indexing:
to make "key" field the Primary Index:
...
...
With idxPrimary
.Fields.Append idxPrimary.CreateField("key")
.Primary = True
End With
tdfMenu.Indexes.Append idxPrimary
arnel_gp
Jun 12, 2022Iron Contributor
you don't have "PrimaryIndex" field name when you created the Table.
you select from the table field which one is the Field you are Indexing:
to make "key" field the Primary Index:
...
...
With idxPrimary
.Fields.Append idxPrimary.CreateField("key")
.Primary = True
End With
tdfMenu.Indexes.Append idxPrimary
you select from the table field which one is the Field you are Indexing:
to make "key" field the Primary Index:
...
...
With idxPrimary
.Fields.Append idxPrimary.CreateField("key")
.Primary = True
End With
tdfMenu.Indexes.Append idxPrimary
- RoyLehmannJun 12, 2022Copper ContributorThank you for your help. Problem solved.