0
votes

Given master: Record A B

Detail Choice Record Y A N A Y B N B

using mastersource with index Record

If the cursor i on A (master), detail shows the two records linked to A (and so on). This is ok. If I leave the window, i want to check that all the records in detail A has Y and all then records B has Y in detail. But it seems that I can check only the master/detail that has the focus in master. I cannot find the B records in detail, if I am on the A master records. Is there a way to traverse master programatic, starting on first records and get detail, then second record and get detail?

1

1 Answers

2
votes

Of course there is:

MasterTable.First;
while not MasterTable.Eof do
begin
  while not ChildTable.Eof do
  begin
    // Access child table data here. It will contain only the
    // rows related to the current row of MasterTable
    ChildTable.Next;
  end;
  MasterTable.Next;
end;