Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scrolling and moving two tables at the same time
Message
From
10/11/2004 11:54:38
 
 
To
10/11/2004 10:06:36
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows '98
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00959374
Message ID:
00960065
Views:
11
>>Unless you have 2 grids - one showing the parent data and the other showing the child data, alongside.
>>
>>Terry
>
>Terry,
>
> The little test I ran was just thowing in a few fields from the main table and the one linked from the small (lookup) table.
>
> I am not surprised I got the response on getting data from two seperate tables into a grid because some other people have asked me how I did that. Two grids beside one another would not work either because the child grid still would not display the correct value during scrolling the parent one. The problem is scrolling with the record pointer staying in the same place. All I need to do is figure out how to sync the record pointer in the table with the position displayed in the grid or a certain column in it when scrolling up or down.

Kev
If you have 2 grids: Parent and child:

In the DE I assume you have the 2 tables. They may have a relation line joining them, if you haven't removed it (I generally do cos it's generally a pain), delete it (It won't change the PERSISTANT rel's in your dbc) and drag a line from your parent table to the child's, linking the parent's foreign key to the child record, with the child's primary key.

(You won't be able to do this with the index expressions as you do in the dbc's ERD, but rather with the actual fields, as you would in an Access ERD - go figure)

Now, as you move the rec pointer in the parent table, in its grid, the child table's rec pointer will move in unison, in the child grid.

This should do it.

Best of luck

Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform