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

Copy data from forms via relationships....

P: n/a
Hi,

I have an Access app which has data for our product range set-up as
follows:

Main Form: General Product Data
Sub Form (within Main Form): Low Level Data
Buttons on main form linking to other related data for the current
product.

I am trying to create an additional system where I can copy all the
data & related data for a selected product to a new product record and
then just change various elements such as Name, Cost etc. This would
save an enourmous amount of time in re-typing each individual element
of each product when similar custom products are required.

Is this facility possible, and if so how. I know how to copy a straight
recordset, but not with sub form & related data all at the same time,
whilst creating new record ID's etc.

Appreciate your help

David

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Umm... if you have an autonumber PK, this could be hard. You'd have to
run the insert, grab the returned primary key, then pass that to the
"insert child records" routine, which would mean you'd have to run the
insert in a function in code, and then the new PK would be returned as
the function's return value. then you'd pass that value to your second
(child record) insert as the foreign key (or one of them - depends on
how your tables are set up.)

Perhaps someone else here has some better ideas, as I'm sure this is
not the best way to do it.

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.