Hi Nadya,
Please ignore my previous message. I misunderstood your question.
Kam.
>Hi Nadya,
>
>You may need: GO RECNO('BldMstr') IN BldMstr after the seek to refresh
>the related records in the relation. From my experience, sometimes something like that happens in Grid.
>
>Kam.
>
>>Hi everybody,
>>
>>Here is a problem in my colleague's application. One table, aliased as BldMstr, is part of a database. It's in Situs order upper(TOWN+Street+str(StNum,5)+StNumExt+Unit). There is a free table, called MersMstr. It has the same index, but filtered.
>>
>>In the Load of the form SET EXACT OFF
>>In the Init:
>>
>>select BldMstr
>>set relation to town into MersMstr
>>
>>In the grdBldMstr.AfterRowColChange && I quote all code by memory
>>
>>lparameter nColIndex
>>if this.nCurRec<>recno('BldMstr')
>> =seek(upper(BldMstr.town+left(BldMstr.Street,1)),'MersMstr')
>> if left(BldMstr.street,1)<>left(MersMstr.street,1)
>> =seek(upper(town)),'MersMstr')
>> endif
>> thisform.grdMers.nCurRec=recno('MersMstr')
>> thisform.grdMers.LocateRecordOnTop()
>>endif
>>dodefault(nColIndex)
>>
>>However, this code doesn't work in all cases. We see some strange behavior. For instance, when navigating in the grdBldMstr and town is changed, the Mers grid doesn't show the correct street record. However, the next record in the same town is shown correctly, and if we move up, the previously incorrect record is shown correctly now too. There are couple other oddities in those grids.
>>
>>Do you know, is it possible to make this form work using set relation? It could be probably solved by using view on MersMstr, but I'm afraid, it would be too complicated for my colleague to re-design...
>>
>>Thanks in advance.