General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Need Grid to Show All Child Records that Match Parent Key
I am trying to get a grid to show each child record that matches the key in the parent table. I put 3 records (1,2,3) into the parent table, and 4 (a,b,c,d) into the child table. If it were working properly, picking record 2 from the parent would show child records b and d in the grid. Instead, what is happening is that 4 rows appear; all of the columns to which I assigned a ControlSource are showing record b's data, and the columns without a ControlSource are showing data for each record (a,b,c,d).
In other words, instead of:
b,b,b,b,b (Row matching data in record b)
d,d,d,d,d (Row matching data in record d)
I'm getting:
b,b,a,b,a
b,b,b,b,b
b,b,c,b,c
b,b,d,b,d (Four rows, with a hodgepodge of record b and the sequential row)
I have tinkered with LinkMaster, ChildOrder, and RelationalExpr. I have tried SET KEY TO, REFRESH(), SET SKIP TO, and moving the record pointer. I have set up the relation in the LOAD, INIT, and ACTIVATE methods (not all at once), and in a new method that I created.
Right now, my code is:
*Init method
SELECT child
SET ORDER TO childindex
SELECT Parent
SET RELATION TO parentkey INTO child
SEEK tuParm1 &&Parameter passed from previous form
All of the other relevant properties are default.
How do I fix this problem?
Next
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