I have created a database to keep track of our production on each
machine. Everytime an operator starts a new item on that machine they
start a new record. This record records the start and stop time and
the total number of pieces they made on that machine so far that day.
The machine total can only be reset once a day. I need to figure out
the number of pieces per record. How do I subtract the previous record
total from the current records total?
Jerry
|
|
0
|
|
|
|
Reply
|
jerryy75 (1)
|
5/2/2005 7:07:34 PM |
|
On 2 May 2005 12:07:34 -0700, jerryy wrote:
> I have created a database to keep track of our production on each
> machine. Everytime an operator starts a new item on that machine they
> start a new record. This record records the start and stop time and
> the total number of pieces they made on that machine so far that day.
> The machine total can only be reset once a day. I need to figure out
> the number of pieces per record. How do I subtract the previous record
> total from the current records total?
how about those fields:
serial: auto enter serial number
serial_1: auto enter calculated value "serial - 1"
replace existing values
and the relation
prev:: from serial_1 to serial
Now prev::total is the sum of the previous record.
Comments:
- instead of serial_1 I name the field serial-1, where the -
is the 'other' minus: opt-'-'
- the mechanism is based on continuous serial numbers.
As soon as you delete one record the chain is broken.
The chain then can be corrected easily by e.g.
select all records
sort by serial
replace serial by new serial number, auto-incrementing the offset
... which will enumerate all records again.
Personally, I do use prev:: and next:: in order to take a subset of
records, give a new serial number to them and use them e.g. within
another find result in order to goto the next/prev of those highlighted
records. Thus I may see them in another context.
HTH,
Martin
|
|
0
|
|
|
|
Reply
|
Martin
|
5/3/2005 10:19:18 AM
|
|