>I'm taking a look at a poject a fried of mine is working on in which he has a grid that he performs line by line calculations in. The calculations are done during a lost focus in one of the columns that updates another column further to the right of the active cell. The issue that is coming up is that when there are more than one row and he arrows from left to right and then down arrows to the next line, the calculations are firing with a value from the previous row instead of the active row. For Example:
>
>Qty Price Total
>1 1.00 1.00
>2 2.00 4.00
>
>When you arrow through the grid (up/down/left/right, etc.) He gets the following occring if he arrows left to right from qty after arrowing through line 1:
>
>Qty Price Total
>1 1.00 1.00
>2 2.00 2.00
>
>The calculation is in the lost focus of Qty and references the price columns value to calculate the total.
>
>The only way this actually works is to arrow through the entire line to get the correct total. It seems as though the Column reference is only updating when it has been the active cell.
>
>Now the question of the day <g>...how do you reference a columns value of the active row if you haven't made it an active cell prior to the calculations?
>
>Does any of this make any sense that I have written. A little confusing to me as well. <g>
>
>Thanks for any assistance.
I use directly field names (activerow is not thrustable here because in lostfocus it's 0). Why not simply set controlsource to Qty*Price and remove lostfocus code ?
Cetin