Snowflake68
Registered User.
- Local time
- Today, 00:46
- Joined
- May 28, 2014
- Messages
- 464
I have a table of jobs that have a sequence of operations in the order that must be carried out. Each operation has a Y/N flag to indicate if it is completed or not.
I am creating a dashboard which shows each Operation on a separate form and a list of jobs currently at that stage of operation.
For each job I need to show the first operation in the sequence that has not yet been completed (thats the easy bit) but also show a column displaying the next operation for that job.
So on the main form I would have for example the two subforms below
Washing
Job Description Qty Next Operation
12345 Text here 10 Hand Press
Drill
Job Description Qty Next Operation
5678 Text Here 14 Etching
The problem; I can find the lowest number in the sequence to get the first operation that hasn’t yet been completed BUT how do I work out the next operation after that?
The operations are numbered sequentially, usually incremented by 10 each time but I need to find a way of working out what is actually the next number in the sequence as sometimes there could be a new operation inserted in between them so I could have one job with operations 10, 20, 30, 40 ,50 (this is not problem because I can do via queries joined together and just add 10 to the sequence number to find the next operation) but this isn't fool proof because another job could have operations which run 10, 20, 25, 26, 28, 30, 40, 50 because new operations have been inserted.
I am using a series of queries to create the columns I need and then subforms to display the data on one large main form. All this works perfectly accept for the Next Operation column when they dont increment by 10 each time.
I am creating a dashboard which shows each Operation on a separate form and a list of jobs currently at that stage of operation.
For each job I need to show the first operation in the sequence that has not yet been completed (thats the easy bit) but also show a column displaying the next operation for that job.
So on the main form I would have for example the two subforms below
Washing
Job Description Qty Next Operation
12345 Text here 10 Hand Press
Drill
Job Description Qty Next Operation
5678 Text Here 14 Etching
The problem; I can find the lowest number in the sequence to get the first operation that hasn’t yet been completed BUT how do I work out the next operation after that?
The operations are numbered sequentially, usually incremented by 10 each time but I need to find a way of working out what is actually the next number in the sequence as sometimes there could be a new operation inserted in between them so I could have one job with operations 10, 20, 30, 40 ,50 (this is not problem because I can do via queries joined together and just add 10 to the sequence number to find the next operation) but this isn't fool proof because another job could have operations which run 10, 20, 25, 26, 28, 30, 40, 50 because new operations have been inserted.
I am using a series of queries to create the columns I need and then subforms to display the data on one large main form. All this works perfectly accept for the Next Operation column when they dont increment by 10 each time.