472,354 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,354 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 2568
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,...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
1
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. header("Location:".$urlback); Is this the right layout the...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it so the python app could use a http request to get...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...

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.