G
GaryS
[Flak Jacket ON]
OK, I'm NOT REALLY denormalizing my database . . . hear me
out, please!:
I'm using a special-purpose label printer that's driven by
software that reads a table in .mdb format (call it
tLabel); the software prints one label per record. That's
the gist of the situation.
I'm using a MakeTable query to select a subset records out
of tA (which represents individual physical plants in a
garden, BTW), each of which will result in one row in
tLabel.
Thanks to you MVP's, I've gotten the formatting and
generation of the fields in tLabel down pat.
But I can see the requirement to produce more than one
label copy for a given plant (don't ask why!). From the
labeling end, the easiest way would be just to have
*identical* rows in tLabel, adjacent so the copies of the
labels would come out of the printer together.
That means I have to devise a way to make copies of a row
somewhere along the line. Right now, I display a
datasheet view of tLabel just so the user can make any
final edits. I'm thinking, at that point (which is the
only point of manual intervention in the Access-driven
part of the process), they could type a value in a
tLabel.Quantity field if they want more than 1 label for
that plant.
OK, so, when they finish reviewing tLabel, I would need
some postprocessing (Close event of the datasheet?) to
insert the copies of the records.
That's my analysis of the problem.
I see two obstacles:
1. I don't know a slick way to make copies of a row.
2. Right now, tLabel contains tA.id, the Autonumber ID
for tA, which gives traceability back to tA records. I
noticed that in tLabel tA.id appears as an Autonumber
also. So the MakeTable query carried over that Autonumber
attribute from tA to tLabel, I guess. Now, if I'm making
copies of the same record, I'm going to also get
duplications of tLabel.tA.id values, which will trigger an
error.
In writing this, I'm thinking maybe the first
postprocessing step would be to change the type attribute
of tLabel.tA.id from Autonumber to Number.
If so, then the logic would be something like this (I need
help with syntax, too):
Private Function fncGenCopies_tLabel_Close()
tLabel.Fields.Aid.Type = "Number" 'or something
like that
OK, I'm NOT REALLY denormalizing my database . . . hear me
out, please!:
I'm using a special-purpose label printer that's driven by
software that reads a table in .mdb format (call it
tLabel); the software prints one label per record. That's
the gist of the situation.
I'm using a MakeTable query to select a subset records out
of tA (which represents individual physical plants in a
garden, BTW), each of which will result in one row in
tLabel.
Thanks to you MVP's, I've gotten the formatting and
generation of the fields in tLabel down pat.
But I can see the requirement to produce more than one
label copy for a given plant (don't ask why!). From the
labeling end, the easiest way would be just to have
*identical* rows in tLabel, adjacent so the copies of the
labels would come out of the printer together.
That means I have to devise a way to make copies of a row
somewhere along the line. Right now, I display a
datasheet view of tLabel just so the user can make any
final edits. I'm thinking, at that point (which is the
only point of manual intervention in the Access-driven
part of the process), they could type a value in a
tLabel.Quantity field if they want more than 1 label for
that plant.
OK, so, when they finish reviewing tLabel, I would need
some postprocessing (Close event of the datasheet?) to
insert the copies of the records.
That's my analysis of the problem.
I see two obstacles:
1. I don't know a slick way to make copies of a row.
2. Right now, tLabel contains tA.id, the Autonumber ID
for tA, which gives traceability back to tA records. I
noticed that in tLabel tA.id appears as an Autonumber
also. So the MakeTable query carried over that Autonumber
attribute from tA to tLabel, I guess. Now, if I'm making
copies of the same record, I'm going to also get
duplications of tLabel.tA.id values, which will trigger an
error.
In writing this, I'm thinking maybe the first
postprocessing step would be to change the type attribute
of tLabel.tA.id from Autonumber to Number.
If so, then the logic would be something like this (I need
help with syntax, too):
Private Function fncGenCopies_tLabel_Close()
tLabel.Fields.Aid.Type = "Number" 'or something
like that