Wrox Programmer Forums
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 16th, 2004, 11:10 AM
Authorized User
 
Join Date: Nov 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple Table Query Problem

Hello,

I have split up a large order entry table into several smaller tables that are related to the main order entry table. When I add the first support table to the query which has my main order entry table everything works fine and I can add records to the query. The problems comes when I add my second support table to the query, the query does not let me add new records to it.
Each support table is linked to the main table using the main tables promary as a foreign key.

Any help would be appreciated.


 
Old February 16th, 2004, 11:15 AM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think we will need a little more information to solve this one. Can you give use your table names and your PK/FK field names?

Thanks,
Mike
 
Old February 16th, 2004, 11:43 AM
Authorized User
 
Join Date: Nov 2003
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The main Order entry table is tblOrderEntry with the Primary key numOrderID.

The first support table is tblMainForm with its Primary Key numMainID and foreign key numOrderID.

The second support table is tblInserts with ist primary key numInsertsID and foreign key numOrderID.

The relations are set from tblOrderEntry numOrderID to each support table with a one to many relationship.

 
Old February 16th, 2004, 12:21 PM
Authorized User
 
Join Date: Jun 2003
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I understand your structure it looks like this

tblInserts tblOrderEntry tblMainForm
numInsertsID(pk) numMainID(pk)
numOrderID <---------numOrderID(pk)-------->numOrderID

I think the problem lies in the supporting tables. If there isn't a matching foriegn key record in the supporting table then you can't add a record. I don't think I can make a solid recommendation on a solution without having more information. One thing you might try is to make sure that the PK's and FK's are in your data source and set your Recordset type on the data tab for your form to Dynaset (Inconsistent Updates).

HTH,
Mike





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can a Make Table Query produce a Linked table? kronik Access 5 May 16th, 2006 06:17 AM
Multiple table Query-HELP Kathryn SQL Language 1 March 22nd, 2005 10:57 AM
Make Table query : table in Another Database marnik Access 1 March 19th, 2005 12:39 PM
Multiple Joins in Multiple Table Search query pookster Access 4 September 23rd, 2004 03:04 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.