Subject: Multiple Table Query Problem
Posted By: mikericc Post Date: 2/16/2004 10:10:23 AM
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.


Reply By: Dataman Reply Date: 2/16/2004 10:15:40 AM
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
Reply By: mikericc Reply Date: 2/16/2004 10:43:14 AM
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.

Reply By: Dataman Reply Date: 2/16/2004 11:21:03 AM
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

Go to topic 9513

Return to index page 948
Return to index page 947
Return to index page 946
Return to index page 945
Return to index page 944
Return to index page 943
Return to index page 942
Return to index page 941
Return to index page 940
Return to index page 939