Calculating a field based on other fields in a form...

A

A.Farsinejad

I have a database with 2 tables and 2 forms. the forms are: "LUP" and "Case".

In 'LUP" there is a field which is calculated with the below formula:
Field1=[No of cases]/case.[Total of cases]*1000

in which "No of cases" field is in "LUP" form and calculated like this:
"=DCount("*","[Cases]","[No in LUP]=" & Forms!LUP![OLV Number])"
and "Total of Cases" field is in "Case" form and calculated like this:
"=Count([Case Number])"

But when I put these two fields in my formula for "Field1", I got error.

Is there any body who can help me on this issue?
 
D

Douglas J. Steele

As fellow Access MVP John Vinson likes to say "Storing calculated data
generally accomplishes only three things: it wastes disk space, it wastes
time (a disk fetch is much slower than almost any reasonable calculation),
and it risks data validity, since once it's stored in a table either the
Total or one of the fields that goes into the total may be changed, making
the value WRONG."

Create a query that has the formula in it, and use the query wherever you
would otherwise have used the table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top