I think I need to do an update query

mocamira

New member
Local time
Today, 02:47
Joined
Apr 28, 2004
Messages
6
Hi,
First time on this forum, I really hope I'll get a reply!
Here is the situation:
I have a table with an ID, and a velocity value. I want to calculate for each ID the velocity value/the average of all the velocity values. This is very easy to do on excel but not on Acces!
The main problem is I would like this calculated value to change if I change a value in the velocity column.
I was thinking of doing an "update query" by adding a column in my table for the average and then dividing the velocity for each ID by the average. The problem is that in "update to" I would basically like to put = average of all velocities!
A bit confusing really...
 
Fistly, you should not have a field in your table for storing the average.

Secondly, the DAvg() domain aggregate function will give you the average of all records in a table or query (whatever you specify).

So, in a query - all you need to do is create a new field:

NewField: [VelocityValue] / DAvg("Field", "Table")
 

Users who are viewing this thread

Back
Top Bottom