Hi Nataliya,
the logic in your equation doesn't look right; after
parentheses, multipliplication and division are performerd
before addition and subtraction...
0.5/On+0.5/On-1
will evaulate to (1/On) - 1
....IF On is not null -- if null, you will throw an error
if On-1 is a field name, it is a bad choice since the minus
sign will be interprested as subtraction -- you would need
to enclose it in brackets
if On-1 is a variable name, you should rename the variable
to not include an arithmetic operator
you should always test the denominator anyway since it is
illegal to divide by 0
If you are looking until On has values, you can test for
IsNull in a loop
"On" is a reserved word and should not be used for a fieldname
Warm Regards,
Crystal
MVP Microsoft Access
remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day
Natkol wrote:
> I have problem with execution calculations in Access: I need to perform Calc.
> 1/(0.5/On+0.5/On-1) where On ....On+1 are data in column which could
> contain empty cells. My first gess was to create a "For...Next loop", but
> this loop has to execute untill On has values.
> Can you help?
> Thank you,
> Nataliya