averages


K

Kit

I'm trying to do an average as follows from my Form fields

Form Name is "Benton"
Field one is "grade"
Field two is "grade1"
Field three is "grade2"

I want to average "grade1" and "grade2" and put the means in "grade"

I would like to use a macro but can't figure out how to do it, all I get
when I create a macro are the pre-defined actions.

Any help you can give me will be appreciate. I need this form for a
presentation to my client by tomorrow.
 
Ad

Advertisements

D

Douglas J. Steele

Storing a computed value is seldom a good idea. The "grade" field should not
be in the table. Instead, create a query, and compute the mean in the query,
using something like:

Grade: IIf(IsNull(Grade1) And IsNull(Grade2), Null, (Nz(Grade1, 0) +
Nz(Grade2, 0))/(IIf(IsNull(Grade1), 0, 1) + IIf(IsNull(Grade2), 0, 1)))
 

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