Solved

Duplicate problems

Posted on 2014-02-03
3
177 Views
Last Modified: 2014-02-08
If I am trying to duplicate a Sales order that uses 4 tables , Main (A) and 2 (B and C) tables linked to main.

I can generate a new accountID in A and append the original data to the first Related table to  B This will generate new ID numbers in Table B but there is another Related table C where the ID number has a one to one relationship on the ID numbers on B

How do I append new data to with the correct ID numbers in C table and generate the correct linking ID numbers when they don't exist until the A and B tables are appended
0
Comment
Question by:DatabaseDek
  • 2
3 Comments
 
LVL 35

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39829487
You can do the inserts using DAO in a code loop and that will give you the ID you need as you insert each B record so you can use it to insert the C record.

One-to-one relationships are extremely rare in the real world especially when the "child" is required so I think you should probably reconsider your schema.
0
 

Author Comment

by:DatabaseDek
ID: 39843859
Hi Pat

The reason for two tables is that I am describing something very complex with the data in the form and I ran out of fields. (Yes all 250 of them)

Do you happen to know if this (250fields) is still a limit in later versions of access? I am still soldiering on with 2002 it's brilliantly simple and like many others I hate that ribbon!.
0
 
LVL 35

Expert Comment

by:PatHartman
ID: 39844155
If you ran out of fields, you almost certainly have one or more repeating groups and should normalize the schema to make it easier to work with.

I have been designing data-centric applications using a variety of databases from VSAM and IMS to DB2 and Oracle and lately Jet/ACE and SQL Server for clients ranging from American Express, Readers' Digest and Boeing to the Government of Kuwait  and in over 40 years have never created a table with more than about a hundred columns.

Yes, the limit still exists with ACE (A2007, A2010, A2013).  There really is no reason to change it.  Databases like SQL Server, et al support more columns because they are used for data warehousing in addition to transactional processing applications.  With data warehouse applications, the data is flattened and denormalized and that is why you will occassionally see tables in a warehouse application with large column counts.

Regarding the interface change with A2007 - The ribbon is clunky but it is usable.  It is the nav pain (sic) that I still object to even after using it for over 7 years.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question