473,418 Members | 3,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Create New Parent and Child Records from Old

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
2 2670
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ross | last post by:
ASP.NET Problem: I have a dataset with a parent table and a child table. For every row in the parent table there are ~1/2 dozen corresponding records in the child table. In the ASPX page I have a...
1
by: Aaron Smith | last post by:
I have a parent table that has one child table. The parent has a single field (ID, AutoIncrement, Seed 0, Step -1 in the DataSet, Seed 1, step 1, in DataSource). The child is linked to this ID...
1
by: Hexman | last post by:
Hello All, What I'm trying to do is update a child record using a parent-child relation. I want to find out if it is faster than than doing multiple selects. Anyways, I've created a dataset...
2
by: Catch_22 | last post by:
Hi, I have a stored procedure that has to extract the child records for particular parent records. The issue is that in some cases I do not want to extract all the child records only a...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
8
by: Rick | last post by:
VS 2005 I' m setting up a parent/child datagridviews in a form. I am doing a lot of this by hand coding in order to get the feel of things. I want a change in the parent table to trigger a...
4
by: hellboss | last post by:
Hi everyone ! Im using sq05 I have a set of table which goes to 5 levels of Transation , ex: Parent 1 Parent 2(Child of Parent1) Parent 3(Child of Parent2) Parent 4(Child of Parent3)...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
1
by: andrewst | last post by:
Originally posted by Divya OK:- SQLcreate table parent( parent_id number primary key, parent_name SQLvarchar2(10) ); Table created. SQLcreate table child( child_id number primary key,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.