Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 12:15 PM
david@scene-double.co.uk
Guest
 
Posts: n/a
Default Copy data from forms via relationships....

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

  #2  
Old November 13th, 2005, 12:16 PM
pietlinden@hotmail.com
Guest
 
Posts: n/a
Default Re: Copy data from forms via relationships....

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.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles