G
Guest
I need to calculate a number based on an if statement. The calculation
determines a royalty. I know how the calculation works as a javascript, but
not in Access. For starters, where do I place the statement?
My javascript is:
var c = this.getField("Category")
var d = this.getField("Sales")
{
if
(c.value == " ")
(event.value = 0);
else
if
(c.value == "Food")
(event.value = d.value * 0.04);
if
(c.value == "Health & Beauty")
(event.value = d.value * 0.06);
else
(event.value = d.value * 0.13);
}
Cheers,
Graeme
determines a royalty. I know how the calculation works as a javascript, but
not in Access. For starters, where do I place the statement?
My javascript is:
var c = this.getField("Category")
var d = this.getField("Sales")
{
if
(c.value == " ")
(event.value = 0);
else
if
(c.value == "Food")
(event.value = d.value * 0.04);
if
(c.value == "Health & Beauty")
(event.value = d.value * 0.06);
else
(event.value = d.value * 0.13);
}
Cheers,
Graeme