Update Avg Field

A

Andrew C

I have form with Bowlers ID, Bowlers, Name and Avg Points field.

On a sub form it shows all the tournaments the bowler has competed in and at
the bottom averages out the points he has earned over the events entered.

I then want to ave points to be updated in the original form, or even better
would be for it to update the Ave Pts field in the bowlers table. How can i
get this to happen.

the two forms involved are Bowlers Pts (Main Form), Sub Form - Bowlers Query
subform.
 
A

Allen Browne

The solution here is to remove the [Avg Points] field from your table.
Instead, have Access calculate the value when it needs it.
That way it can't go wrong. Computers are actually good at computing things
like that. :)

Seriously, storing a value that is dependent on other data violates one the
the most basic rules of noralization. You can show the average in a text box
by setting it's Control Source to something like this:
=DAvg("Points" "PointsTable", "[Bowler ID] = " & Nz([Bowler ID], 0))
 

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