>Hi there,
>
>i have two textboxes on a container
>
>1. Price reduction, which can receive an amount in money
>2. Price reduction percent which can receive a reduction in percent
>
>Both controls have some code in their lostfocus event which calucates the amount for the other cpntrol, it the value für the other control is 0, like
>
>
>IF thisform.txtpad.txtpreis.Value > 0
> IF this.value > 0 AND thisform.txtpad.txtrabattproz.Value = 0
> nPreis = thisform.txtpad.txtpreis.Value
> nRabatt = thisform.txtpad.txtrabatt.Value
> nProz = ROUND(nRabatt / (nPreis / 100),2)
> thisform.txtpad.txtrabattproz.Value = nProz
> Endif
>Endif
>
>
>So far, so good. But now:
>
>If I enter a value in the first field (Amount of money) and save the position the following happens in my code
>
>
>nNLBetrag = thisform.txtpad.txtrabatt.value
>nNLProz = thisform.txtpad.txtrabattproz.Value
>SET STEP ON
>
>
>The first var holds the value which was entered
>The second var is 0, but if i point the cursor to "txtrabattproz.Value", the correct value is shown.
>Why is the value not assigned to the var and what is happening there?
>So as examle; I have a price of 3 and enter a reduction of 1. In the save routine. The var "NLBetrag" is 1 but nNLPROZ is 0 instead of 33.33 (shown as value of the txtbox by the debugger)
>
>Thanks in advance
>
>Thomas
move setting code in Valid procedure