Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Navigate to the particular record in the child table
Message
From
22/06/2001 17:24:13
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00522661
Message ID:
00522671
Views:
8
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everyone,
>
>This is Foxpro 2.x question, which my colleague just asked me.
>
>There is a parent and a child table, which are related by town. The user wants to navigate on the parent table and see record displayed at the child table, which has the same first letter of the street, as the parent table. I have an idea about using temp index with two tables, but it's not a good solution.
>
>The problem here, how can we know, that user navigates, since its Fox2.x question and we don't have all events...
>
>Can you help me, please?
>
>Thanks in advance.

Hi Nadya,

First, create an index in the child table based on the town and 1st letter of street and set the relationship between the two tables
SELECT Child
INDEX ON town + left(street,1) TAG LookTown
SELECT Parent
SET RELATION TO town + left(street,1) INTO Child
Now, as you navigate Parent, the desire records in Child will be ready to view. If the field length of Town is not the same in the Parent and Child tables, you'll need to add PADR to the index and relation to make them work properly.
David.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform