Using data from one stack to update another stack
Posted: Wed Mar 26, 2008 10:23 pm
2 substacks: "Detail" and "Summary"
Detail contains one card for each entry.
Summary contains only 1 card.
I want to read a card from Detail and then add a field content from the Detail record into a field in the Summary.
When Summary opens, in an openCard handler (note, ALL of the following is done in the openCard handler), I initialize all the fields in the Summary card to zero... that works.
I then open Detail invisible...
A repeat loop (from 0 to number of cards in Detail) then executes.
In that repeat loop is code that reads data from the card and sets an index... this works.
Then I add 1 to a 'counter' field in the Summary. And that's where it always dies.
The actual code to add is add 1 to field("YTNR" & i) where i is the index mentioned above. (There are 4 fields named YTNR1, YTNR2, YTNR3 and YTNR4... the index resolves to a 1, 2, 3 or 4).
It looks like it's not recognizing the field... I've tried everything (except the right answer
Thanks in advance....Tom
Detail contains one card for each entry.
Summary contains only 1 card.
I want to read a card from Detail and then add a field content from the Detail record into a field in the Summary.
When Summary opens, in an openCard handler (note, ALL of the following is done in the openCard handler), I initialize all the fields in the Summary card to zero... that works.
I then open Detail invisible...
A repeat loop (from 0 to number of cards in Detail) then executes.
In that repeat loop is code that reads data from the card and sets an index... this works.
Then I add 1 to a 'counter' field in the Summary. And that's where it always dies.
The actual code to add is add 1 to field("YTNR" & i) where i is the index mentioned above. (There are 4 fields named YTNR1, YTNR2, YTNR3 and YTNR4... the index resolves to a 1, 2, 3 or 4).
It looks like it's not recognizing the field... I've tried everything (except the right answer

Thanks in advance....Tom