P
Petr Danes
I have two datasets linked in a one-to-many relationship. The many side of
the dataset comprises two identical layouts, differing in only one key
field. I have so far dealt with the issue by splitting the many side of the
dataset into two tables, each served by a separate subform off the main form
and a set of toggle buttons to switch between identical overlaid displays.
It works, but the duplication of everything is starting to get under my
skin. It seems there should be a better way to handle this, but I have been
unable to think of one.
The core of the problem lies in the fact that the key fields are not quite
identical in behavior. There are two fields, letter(s) and number to make up
the key. They have data like:
K 23
K 34
K 199
L 100
L 150
L 179
T 331
T 452
T 453
and
Ls 56
Ls 56
Ls 57
Ls 57
Ls 57
Ms 120
Ms 135
Vs 22
Vs 22
Vs 76
Vs 938
Vs 938
and so on. Sharp guessers have probably spotted the difference already: one
subdataset has duplicates in the key field, the other does not, so I have
two different indexes on the two tables, one allowing duplicates, the other
unique. (The "s" stands for skupina, or group.) I would love to combine
these datasets into one table, but the thought of VBA coding to handle the
two different types of data constraint in the same column makes my skin
crawl, not to mention that it would be dependent on the code, rather than an
attribute of the table directly.
Other than this one peccadillo, the tables are -completely- identical, which
makes all the duplication very irritating, but a better approach has so far
escaped me. Does anyone have an idea how this might be better designed?
Pete
the dataset comprises two identical layouts, differing in only one key
field. I have so far dealt with the issue by splitting the many side of the
dataset into two tables, each served by a separate subform off the main form
and a set of toggle buttons to switch between identical overlaid displays.
It works, but the duplication of everything is starting to get under my
skin. It seems there should be a better way to handle this, but I have been
unable to think of one.
The core of the problem lies in the fact that the key fields are not quite
identical in behavior. There are two fields, letter(s) and number to make up
the key. They have data like:
K 23
K 34
K 199
L 100
L 150
L 179
T 331
T 452
T 453
and
Ls 56
Ls 56
Ls 57
Ls 57
Ls 57
Ms 120
Ms 135
Vs 22
Vs 22
Vs 76
Vs 938
Vs 938
and so on. Sharp guessers have probably spotted the difference already: one
subdataset has duplicates in the key field, the other does not, so I have
two different indexes on the two tables, one allowing duplicates, the other
unique. (The "s" stands for skupina, or group.) I would love to combine
these datasets into one table, but the thought of VBA coding to handle the
two different types of data constraint in the same column makes my skin
crawl, not to mention that it would be dependent on the code, rather than an
attribute of the table directly.
Other than this one peccadillo, the tables are -completely- identical, which
makes all the duplication very irritating, but a better approach has so far
escaped me. Does anyone have an idea how this might be better designed?
Pete