By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,850 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,850 IT Pros & Developers. It's quick & easy.

Create New Parent and Child Records from Old

P: n/a
My ColorSet building form/subform now works beautifully, thanks to the
help that I've gotten from people in this group.
The working form displays the parent ColorSet record with the
child records displayed in the subform below it.

ParentTable fields: ColorsetName Classsize [& a few irrelevant fields]
ChildTable fields: ColorsetName ColorSequenceNumber RedVal GreenVal BlueVal
I've now been asked to allow the user to generate a new ColorSet from
an existing one: the new ColorSet record will have associated to it a
subset of the old ColorSet's colors [which subset might be all of the
old ones], and possibly newly defined additional colors.

I am not at a loss as to how to allow the user to define the new
ColorSet parent and child records, but I have a feeling that what I'm
thinking of is more like coding in C or even Perl than a natural VBA
solution. I'm thinking in terms of a command button for
requesting the new ColorSet, textboxes for its name etc, a checkbox with
the sequence numbers of the existing ColorSet from which user chooses
those to be included in the new one, and lots of code to get the
information into the new records. I haven't yet thought about where
to define any new colors.

I'd appreciate it if someone could sketch for me an approach that
an experienced Access programmer would use to implement this
thanks, --thelma

Nov 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Thelma Lubkin wrote:
My ColorSet building form/subform now works beautifully, thanks to the
help that I've gotten from people in this group.
The working form displays the parent ColorSet record with the
child records displayed in the subform below it.

ParentTable fields: ColorsetName Classsize [& a few irrelevant fields]
ChildTable fields: ColorsetName ColorSequenceNumber RedVal GreenVal BlueVal
I've now been asked to allow the user to generate a new ColorSet from
an existing one: the new ColorSet record will have associated to it a
subset of the old ColorSet's colors [which subset might be all of the
old ones], and possibly newly defined additional colors.

I am not at a loss as to how to allow the user to define the new
ColorSet parent and child records, but I have a feeling that what I'm
thinking of is more like coding in C or even Perl than a natural VBA
solution. I'm thinking in terms of a command button for
requesting the new ColorSet, textboxes for its name etc, a checkbox with
the sequence numbers of the existing ColorSet from which user chooses
those to be included in the new one, and lots of code to get the
information into the new records. I haven't yet thought about where
to define any new colors.

I'd appreciate it if someone could sketch for me an approach that
an experienced Access programmer would use to implement this
thanks, --thelma

If you are picking colors, I'd create a form that stores the colors you
select. Then I'd use the code found at
http://www.mvps.org/access/api/api0060.htm to define/store the results.

I'd take your current colors and store them to a table. Define a
colorset name for it. Then allow the set to be copied. If a new color
is to be created, in the Dbl-click event for a textbox call the picker
and store the value from the picker to it.

I really don't understand your problem. But if I were doing a color
picker, I'd at least look at the code and study the zip file.
Nov 23 '05 #2

P: n/a
The exact details depend on how you've keyed the tables, but the general
approach I would take would be
1) copy all the records
2) present the new record(s) to the user to allow editting, amendment
and deletion.

The copy all the record part depends on whether you've used autonumber
fields as the key or a natural key. If you used autonumber then you just
need SQL insert statements which copy all the fields except the autonumber
field.

If you use a natural key you need to prompt for the values of the natural
key; you can then combine these with the other fields in the current record
to build the insert statement.

Remember of course you need to create the parent record before the child
records.

--
Terry Kreft

"Thelma Lubkin" <th****@alpha2.csd.uwm.edu> wrote in message
news:dl**********@uwm.edu...
My ColorSet building form/subform now works beautifully, thanks to the
help that I've gotten from people in this group.
The working form displays the parent ColorSet record with the
child records displayed in the subform below it.

ParentTable fields: ColorsetName Classsize [& a few irrelevant fields]
ChildTable fields: ColorsetName ColorSequenceNumber RedVal GreenVal
BlueVal
I've now been asked to allow the user to generate a new ColorSet from
an existing one: the new ColorSet record will have associated to it a
subset of the old ColorSet's colors [which subset might be all of the
old ones], and possibly newly defined additional colors.

I am not at a loss as to how to allow the user to define the new
ColorSet parent and child records, but I have a feeling that what I'm
thinking of is more like coding in C or even Perl than a natural VBA
solution. I'm thinking in terms of a command button for
requesting the new ColorSet, textboxes for its name etc, a checkbox with
the sequence numbers of the existing ColorSet from which user chooses
those to be included in the new one, and lots of code to get the
information into the new records. I haven't yet thought about where
to define any new colors.

I'd appreciate it if someone could sketch for me an approach that
an experienced Access programmer would use to implement this
thanks, --thelma

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.