no corresponding record on "one" side

uivandal

New member
Local time
Yesterday, 22:36
Joined
Jul 31, 2010
Messages
6
I am creating a program for an auction scenario. An item comes up for bid and a buyer places a bid. My tables are:
tblItems
tblBuyers
tblBidInfo

tblItems have a 1 to 1 relationship with tblBidInfo and are linked by ItemID.
tblItems have a 1 to many relationship with tblBuyers and are linked by BuyerID. (buyers can buy more than one item)

My form is based on a query with all three tables. The form shows all of the Item info. I have a combo box to pull up the buyer info. When I try to select a buyer I get the error "Records can't be added; no corresponding record on "one" side.

What am I doing wrong?
 
You are missing an "entry" for either "tblBidInfo" or "tblBidInfo". I don't know which table you intend to use as your main table. But for your main table, "ItemID" should be an auto-generated number. Also, the "ItemID" should be used only for linking tables, not to actually identify the item.

If "tblBidInfo" is NOT your main table, it should have a long integer that is a duplicate value to "ItemID". However, it should not have the same name for purposes of clarity.

When a new record is created, you will need to have either the parent/child relationship established in the form or use VBA to assign a value to your "child" table's equivalent of "ItemID".
 

Users who are viewing this thread

Back
Top Bottom