Automatically update records from different records

jomuir

Registered User.
Local time
Today, 12:31
Joined
Feb 13, 2007
Messages
154
I have now created my database and a form for viewing results; I am now looking into adding some automated updates.

I have done some basic on update function to update fields in the same record, but now I am looking to update a field in a different record with the sum of a field from 9 different records. So I am looking to do something like:-

If [Hole] = ‘OUT’ then
Gross = sum [Gross] – for all the same CouseID, PlayerID, TimeID and for holes 1-9


One more:-
If [Hole] = ‘Total’ then
Gross = ((Gross when [Hole] = ‘IN’) + (Gross when [Hole] = ‘OUT’))
This should only be done for the same CouseID, PlayerID, TimeID

From this I should be able to calculate all the other sums and automated calculations.
 

Attachments

Had a further look at your updated golf app and glad to see you took my advice on board. However, I feel that adding summary rows in your holes table is going to confuse issues later on as you will always have to contend with fields that are meaningless in the way of summaries, etc.

I know you are doing it for comestic reasons and for display purposes but it is the reason why you are asking this further question.

Create further queries that group by course, by inward/outward (put another field in your holes table and Text 1 char the has the letter (I)nward and (O)utward in it to denote 1-9 and 10-18.

This will simplify things greatly.

David
 

Users who are viewing this thread

Back
Top Bottom