Sort Detail Tbl

I am trying to sort a detail table in a master/detail relationship.
When I assign the Index to sort by I get an EVariant Error 'Invalid
variant type conversion'.  Is it not possible to sort a detail table on
a secondary index?  Thanks Ed