I have the following code on an intranet page
If Pme="AAA" then
newrate=payrate+(payrate * 0.2)
msgbox (currentchg.value < newrate) & " : " & currentchg.value & " < " & newrate
If currentchg.value < newrate then
The user enters a pay rate on the form, and the code is meant to calculate the charge rate at 20% above the pay rate. eg. a pay rate of 21 gives a charge rate as 25.2 which is correct, and computes correctly on the form.
The user should be able to amend the charge rate upwards, but not downwards unless either the bflag or oflag is checked. In the above example if I change the 25.2 to 23, the msgbox (put in for testing purposes) tells me that 23 is less than 25.2 is false and it doesn't change the rate.
What am I doing wrong?