Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Duplicate problems

Posted on 2014-02-03
3
Medium Priority
?
187 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 40

Accepted Solution

by:
PatHartman earned 2000 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 40

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Sometimes MS breaks things just for fun... In Access 2003, only the maximum allowable SQL string length could cause problems as you built a recordset. Now, when using string data in a WHERE clause, the 'identifier' maximum is 128 characters. So, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

810 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