>>Thanks Cathy, this seems to work and I sort of actually understand it. Is it true that you can only run one command in the OnExit Expression? What would you do if you needed to deal with more than one variable?
>
>Yes, you can only run one "expression" .. but Naomi pointed out a great trick which I hadn't thought of: NVL(_VFP.SetVar('a',a+1), '') + NVL(_VFP.SetVar('b',b+1))
>
>The _VFP.SetVar returns NULL, so the NVL() turns it into an empty string, which can then be added to the next expression. Brilliant.
It was Sergey's idea, I believe, which I learnt several years ago.
If it's not broken, fix it until it is.
My Blog