Hi -- I have a Data entry/sequencing problem. Any help appreciated.
Here is the scenario:
Given -- A table with the following fields and sample data:
LineNo Pri Comp Init Tgtno PMno
1 1 1 1 a 1
2 1 1 2 a 1
3 1 1 2 b 1
4 1 1 2 c 1
5 1 1 2 d 1
6 1 1 3 a 1
7 1 2 1 a 1
8 1 2 1 b 1
9 1 2 2 a 1
10 1 3 1 a 1
11 1 3 1 b 1
12 2 1 1 a 1
13 2 1 1 a 2
14 2 1 2 a 1
15 2 1 3 a 1
16 2 1 3 b 1
17 2 1 3 c 1
18 2 1 4 a 1
19 2 1 4 b 1
20 2 2 1 a 1
21 2 2 1 b 1
22 2 2 2 a 1
23 3 1 1 a 1
24 3 1 1 b 1
25 3 2 1 a 1
26 3 2 2 a 1
27 3 2 3 a 1
28 3 2 4 a 1
29 3 2 5 a 1
30 3 2 6 a 1
31 3 2 6 a 2
32 3 2 6 b 1
33 3 2 6 c 1
Problem: If you are in an edit screen at line 22 and want to add a
record. Is there a way to automate the entry so that it writes the
next logical numbering sequence -- based on the values in the next
record?
For example:
22 2 2 2 a 1
the next record values would automatically be written:
22.1 2 2 2 a 2
or if you are at line 31...
31 3 2 6 a 2
the next record would automatically be written:
31.1 3 2 6 a 3
or -- if you are on line 33 ...
33 3 2 6 c 1
Because there are no following records it should write:
34 1 1 1 a 1
I know this is not an easy problem, but any help will be greatly
appreciated.
Thanks,
RBollinger