472,146 Members | 1,395 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Cloning a recordset but adding user input

This is an "Add product" form.

The user will enter a ProductNo (catalog number), select a Product Class
(from cascading combo boxes) and then click a button to create the product.

When a product is added, a recordset (class) from a table (tblClassDetails -
fields are: ClassID, SpecID) will be cloned into another table
(tblClassProJoin - fields are ClassID, ProductID, SpecID and Value).
Obviously, ClassID and SpecID will be cloned.

The ProductID field is tricky. Product numbers are held in tblProducts. Each
Product number (the product's catalog number) will have a corresponding
ProductID which will be an autonumber field (duh). Ideally, the new product
record would be added to tblProducts and the ProductID field value would be
created. Just after, this ProductID would be added to tblClassProJoin as per
above.

The Value field from tblClassProJoin is not required for this form. It will
be manually entered later.

Any thoughts on how this can be accomplished. I was thinking of an append
query but I don't know how to get the cascading class selection as a
parameter.

Obviously, I'm a bit of a knob as far as access is concerend. _Beginning
Access 2002 VBA_ is on the way, but I thought I'd get a head start here.

Thanks for any thoughts.

Regards,

Robin


Nov 12 '05 #1
2 2346
Robin S. wrote:
This is an "Add product" form.

The user will enter a ProductNo (catalog number), select a Product Class
(from cascading combo boxes) and then click a button to create the product.

When a product is added, a recordset (class) from a table (tblClassDetails -
fields are: ClassID, SpecID) will be cloned into another table
(tblClassProJoin - fields are ClassID, ProductID, SpecID and Value).
Obviously, ClassID and SpecID will be cloned.

The ProductID field is tricky. Product numbers are held in tblProducts. Each
Product number (the product's catalog number) will have a corresponding
ProductID which will be an autonumber field (duh). Ideally, the new product
record would be added to tblProducts and the ProductID field value would be
created. Just after, this ProductID would be added to tblClassProJoin as per
above.

The Value field from tblClassProJoin is not required for this form. It will
be manually entered later.

Any thoughts on how this can be accomplished. I was thinking of an append
query but I don't know how to get the cascading class selection as a
parameter.

Obviously, I'm a bit of a knob as far as access is concerend. _Beginning
Access 2002 VBA_ is on the way, but I thought I'd get a head start here.

Thanks for any thoughts.

Regards,

Robin


Hi Robin: I find the description of what you want to accomplish very
difficult to follow and comprehend. "Classes" are often used to
describe the code of properties and methods of an object. Clone refers
to creating duplicate recordsets.

Although you are very descriptive, I would recommend you keep it simple
and redefine the problem. If you get a response that answers your
question, ignore my response.

Nov 12 '05 #2
Hi Robin,
Just to second what the other poster said, you might consider posting a
list of the tables you're describing here, and how they relate to each
other (i.e, which field in one table stores a value from another).

Some specific questions:
Are you adding a product to the list of available products, or to an order?

Also, to clarify terminology:
1) Make sure to distinguish between a recordset, which is a set of
records pulled up at a particular time, from an individual record.

2) Along those lines, I'd use the word "duplicate" instead of "clone",
because it sounds like you may be trying to duplicate a record
(something I happened to have just finished working on). Cloning in
Access refers to making a copy of a Recordset object, which is an
in-memory data structure which holds a recordset you've pulled.

3) Since you're talking to object-oriented programmers, make sure you
distinguish between a class which defines a type of object and your
classes of products, which is what I believe you've stored in your
tblClassDetails.

That said, what you're trying to accomplish sounds eminently doable.
We'll just need to sort out what goes in what table when...

Cheers,

EE

Robin S. wrote:
This is an "Add product" form.

The user will enter a ProductNo (catalog number), select a Product Class
(from cascading combo boxes) and then click a button to create the product.

When a product is added, a recordset (class) from a table (tblClassDetails -
fields are: ClassID, SpecID) will be cloned into another table
(tblClassProJoin - fields are ClassID, ProductID, SpecID and Value).
Obviously, ClassID and SpecID will be cloned.

The ProductID field is tricky. Product numbers are held in tblProducts. Each
Product number (the product's catalog number) will have a corresponding
ProductID which will be an autonumber field (duh). Ideally, the new product
record would be added to tblProducts and the ProductID field value would be
created. Just after, this ProductID would be added to tblClassProJoin as per
above.

The Value field from tblClassProJoin is not required for this form. It will
be manually entered later.

Any thoughts on how this can be accomplished. I was thinking of an append
query but I don't know how to get the cascading class selection as a
parameter.

Obviously, I'm a bit of a knob as far as access is concerend. _Beginning
Access 2002 VBA_ is on the way, but I thought I'd get a head start here.

Thanks for any thoughts.

Regards,

Robin

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bruce | last post: by
1 post views Thread by colmkav | last post: by
reply views Thread by leo001 | last post: by

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.