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

Cloning a recordset but adding user input

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.