Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 4th, 2005, 07:53 AM
anto_123 anto_123 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 1 anto_123 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 19 sec
Reputation Power: 0
copy records to another table

Hi,
I was wondering could you help me.
I have 4 tables

'A'
'A-details'

'B'
'B-details'

Table 'A' is in a one-to-many relationship
with 'A-details'

as is
Table 'B' in a one-to-many relationship
with 'B-details'

Both sets of tables are in forms with subforms
ie FORMB has mutiple records from 'B-Detail' displayed.
What i want to do is create a button that will copy the current record from table 'B' and INSERT it into table 'A' at the same time
copy the associated 'B-details' into 'A-details'

Can some one help

thanks in advance

Anthony

Reply With Quote
  #2  
Old August 4th, 2005, 12:03 PM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
You can use two append queries to do the job. One to append TableA with TableB's filtered record and do the same for TableA-Details with TableB-Details filtered records. The only drawback is if TableA already has a primary key value from TableB then you will get a key violation, so you will need to create some work around if that is the case.

BTW, why would you need duplicate records in your database anyway?

lwells

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > copy records to another table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT