>I have a 1 to many form. In the child table, I have a field = STR(parent.id,8)+STR(no,2). The field is indexed to control the order of child record in the grid.
>
>In order to use this pratice, I need to SET EXACT OFF.
>
>This will cause a problem when I need to find record by using INDEXSEEK(). I need to SET EXACT ON before run the command, and then set it back to OFF.
>And the most serious is the grid will no funtion properly after all.
>
>Can anyone give me some idea to solve the problem? Any other idea to control the order of child grid??
>
>TIA.
You don't need set exact on/off for indexseek(). Match your expression to index key. ie : if tag key was lastname,
indexseek(padr(lcExpr,fsize('lastname','mytable')),.F.,'myTable','myTag')
would simulate an 'exact on' indexseek.
Also instead of str(parent.id,8)+str(no,2), bintoc(parent.id)+bintoc(parent.no) sounds to be better IMHO. If need be create a separate tag for parent.id.
Cetin