Rolling sum count update qry

Suncoast

New member
Local time
Yesterday, 21:32
Joined
Oct 28, 2009
Messages
8
This is a tough one:

I am sending records to a table that feeds a cutting machine. I need a field updated when the rolling sum gets to 1100 ft, and then reset the sum. I do not know if this can be done in a query, but that is all I know what to do.

Example:
id:1 job:1 quantity:10 length:20 break:0
id:2 job:1 quantity:10 length:30 break:0
id:3 job:1 quantity:10 length:40 break:0
id:4 job:1 quantity:10 length:50 break:0

How would I update id:3's break to a 1 since the next record would take it over 1100ft?
 
i think you need to restructure. this is not the best way to get this done. it may be more geared for Excel. You're going to need a function to do it for you I'm afraid.
 
I got the rolling sum figured out:
RollingSum: DSum("([CUT_LENGTH_FT]*[QUANTITY])","[TableA]","[DETAIL_ID]<=" & [TableA].[DETAIL_ID]

Now I have another problem I will post in a different thread.
 

Users who are viewing this thread

Back
Top Bottom