subform troubles

  • Thread starter Thread starter mrmoks
  • Start date Start date
M

mrmoks

Guest
Hi All
I have created a subform to input data into 2 tables set as a 1 to many relationship.tbl Orders can have many records in the tblOrderdetails table,linked field order number.I can enter a new order and the first set of details but when I reopen the form to input a second record into the tblOrderdetails(datasheet)I enter the order number in the main form and it throws the message regarding data duplicates not allowed etc.I am guessing that this is being treated as a new record?My question is how do I update the tblOrderdetails table if I can't find the initial record?

hoping you can assist

mrmoks
 
Hi Mr Moks

Are you sure you have your one-to-many relationship set up correctly?

The One side should be in the main table (tblOrders), the many in the tblOrderDetails (using the OrderID as the foreign key in this second table).

Failing that, have you checked that OrderID in the tblOrderDetails table is set to "Yes, Duplicates OK" for the indexing?


HTH


Rich
 
Rich,I have my tabes set as you have written, but still I get this problem. Pat, the orderID is indeed bound to one of the tables but hang on there, I am struggling to grasp what you say. Could you elaborate a little for me please?

mrmoks
 

Users who are viewing this thread

Back
Top Bottom