Not sure of the best place to post this.....anyway here it is.
I need to do some calculations on a form but also want the calc available in the query so I can build a report.
What I need is the value in one field (i.e. age 15) to lookup a corresponding value in another table and do a calculation, the result is then used to calcuate another field which will also ref the other table to get the corresponding value to calculate.....and so on, I have 3 - 4 calculations to do.
Can this be done with query expressions or is an If statement the best way?
Would something like this work
If txtBox1 = 15 then * 1.25 else
If txtBox1 = 16 then * 1.5 etc
(I have values 1 - 17 to do calculations on.)
Not sure of the exact syntax but you get the idea. Hope this makes sense.
Would be grateful for any advice.
Thanks
RussG
I need to do some calculations on a form but also want the calc available in the query so I can build a report.
What I need is the value in one field (i.e. age 15) to lookup a corresponding value in another table and do a calculation, the result is then used to calcuate another field which will also ref the other table to get the corresponding value to calculate.....and so on, I have 3 - 4 calculations to do.
Can this be done with query expressions or is an If statement the best way?
Would something like this work
If txtBox1 = 15 then * 1.25 else
If txtBox1 = 16 then * 1.5 etc
(I have values 1 - 17 to do calculations on.)
Not sure of the exact syntax but you get the idea. Hope this makes sense.
Would be grateful for any advice.
Thanks
RussG