General information
Category:
Forms & Form designer
Well, SET KEY was a nice, quick fix. Thanks.
I've still got many forms using the SET RELATION model, even though I know it is old school.
One reason is, I have grids that have table.field values set in the columns for the ControlSource, so when I place the grid on a page, it expects a certain table name and that it be prestent, so I have this pattern of opening the tables in the load event, then the grids are happy.
I'm sure it could be re-done, and I plan to one day...
Thanks again.
>The simpliest way around would be either to use local views or CA and set parameters in AfterRowColChange event of the grid.
>
>I don't remember last time using relations between tables directly.
>
>Alternatively you also can use SET KEY command, but the tables must be in the correct order.
>
>>I have a grandpart, parent, child, grandchild (yeah, that's deep, but it's real) relationship in place with tables that I set up by calling a prodcude in a command file (I call it from the form Load() event)
>>
>>The Grandparent fields are hosted in textboxes on the form outside of the pageframe (displays current record)
>>The Parent records are in a grid on page 1 of a pageframe. (1-to-many with above)
>>(the Child records are not display anywhere, but the relationship is required to I can chain to the the grandchildred.) (1-to-1 with above, on a per row basis)
>>And finally, the grandchildren are in a grid on page 2. (1-to-many with above)
>>
>>I only want the relation Grandchildren (if any) to show in the page2.grid.
>>
>>It all works if I open the tables and open browse windows in the IDE. (Meaning, each parent filters out the correct children).
>>
>>However, in the form, when I pick a row in the page1.grid, and the go to page2, the grid on page 2 shows ALL records, not just the one that are children of the current parent on page1.grid. It does move the pointer to the correct child, but I get all these extra records.
>>
>>If there are no children, it goes to the bottom, but I still see the last 5 or so records in the grid, even though they are not releated.
>>
>>I've tried sing the Parent/Child properties on the grid, but I could not make that work. I've tried doing =seek() commands, but that does not help.
>>
>>What to do?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only