Thistlestop
Technical User
On a report, one control is 'xxx'. It's any digit from 1 thru 6. I need to calculate the DIFFERENCE between the CURRENT value of xxx (current line on the report) and the PRIOR value (last line on the report). For example, if the current value is 5 and the prior value is 3, I want to show a 2 adjacent to the 5 (since the increase from 3 to 5 is 2).
I tried the following code but I can't get it to work. (I used MsgBox to test). I inserted this into the Report's OnReport section in the Detail section containing my data.
1. Is the line: txtDifference = xxx- ILast correct?
2. MsgBox does NOT show the correct values in xxx
3. Once I get this to work, HOW DO I DISPLAY THE txtDifference VALUE ON THE REPORT ITSELF?
Thanks, Mike
I tried the following code but I can't get it to work. (I used MsgBox to test). I inserted this into the Report's OnReport section in the Detail section containing my data.
1. Is the line: txtDifference = xxx- ILast correct?
2. MsgBox does NOT show the correct values in xxx
3. Once I get this to work, HOW DO I DISPLAY THE txtDifference VALUE ON THE REPORT ITSELF?
Thanks, Mike