M
mderouville
I am trying to create an index with four fields, one of which is descending.
It appears to have something to do with the "Attribute" of the field, and
there is a value called dbDescending.
Set rnindex = db.tabledefs(ofile).createIndex("NormOrd")
With rnindex
.Fields.Append .createfield("Zone")
.Fields.Append .createfield("Dist")
.Fields.Append .createfield("Node")
.Fields.Append .createfield("Mode")
End With
db.tabledefs(ofile).Indexes.Append rnindex
db.tabledefs(ofile).Indexes.Refresh
I cannot set the attribute of the field "Mode". I get an "Invalid Operation"
The Help for Attributes states that for a field in an index object, it is:
Read/write until the TableDef object that the Index object is appended to is
appended to a Database object; then the property is read-only.
It seems I am trying to do this before appending.
I must be missing something. Any suggestions?
Thanks.
It appears to have something to do with the "Attribute" of the field, and
there is a value called dbDescending.
Set rnindex = db.tabledefs(ofile).createIndex("NormOrd")
With rnindex
.Fields.Append .createfield("Zone")
.Fields.Append .createfield("Dist")
.Fields.Append .createfield("Node")
.Fields.Append .createfield("Mode")
End With
db.tabledefs(ofile).Indexes.Append rnindex
db.tabledefs(ofile).Indexes.Refresh
I cannot set the attribute of the field "Mode". I get an "Invalid Operation"
The Help for Attributes states that for a field in an index object, it is:
Read/write until the TableDef object that the Index object is appended to is
appended to a Database object; then the property is read-only.
It seems I am trying to do this before appending.
I must be missing something. Any suggestions?
Thanks.