Solved

Duplicate problems

Posted on 2014-02-03
3
179 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 36

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 36

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Display 2 columns in combobox view 8 30
Problem with vba code 4 45
Gracefully handling 'Record Locked'  Errors 33 38
Copying an open file 3 22
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

820 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