Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two highlighted grids and set relation
Message
From
06/01/2002 03:13:48
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, United States
 
 
To
06/01/2002 02:53:02
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00601088
Message ID:
00601254
Views:
23
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') && Change of the row
>>   =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.
Previous
Reply
Map
View

Click here to load this message in the networking platform