Results 1 to 7 of 7
  1. #1
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100

    Unable To Add Or Change Record

    Hi, I'm getting the following message and am unable to locate the problem relationship or linkage.

    "You cannot add orchange a record because a related record in required in table tblAssetTicker"



    Just wondering if anyone had a suggestion for what control I might investigate to allow me to add data to my table. Thanks.

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Apparently, you have defined constraints on your Relationships via the Relationships Window.

  3. #3
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100
    Hi itsMe, Problem Solved. I had a '0' value in the Default Value field of the Data Type in my Table Design. I've now removed it and all works fine. Cheers.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    It sounds like you have a 1 to Many relationship between tables, and you are attempting to add a record to the Many(side) table BUT there is no corresponding record in the 1(side) table.

    The analogy may be adding a child to a Children table but there is NO record for the Parent(s).

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Interesting, thank you for posting the solution to your issue.

  6. #6
    Micron is online now Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I suspect that the field with the default value was a foreign key in another table (which is, I'll admit, another way of saying there was a defined relationship). One should not have default values for FK's as there is often no match. If you had a value of 0 in the related field of the other table, you probably would not have noticed - until you started getting weird query results if it was the many side, or error messages about unique values violation if it was a one to one relationship. Also, the order in which you choose the parent/child table can cause this issue - it may be backwards.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    DigitalAdrenaline is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Dec 2012
    Posts
    100
    Hi Micron, you would be right. My field was a FK to another table. I'll take that lesson on board. That was an astute pickup. Cheers.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Suddenly unable to add new record
    By amg in forum Forms
    Replies: 6
    Last Post: 01-13-2014, 05:38 PM
  2. Replies: 6
    Last Post: 11-14-2012, 01:06 PM
  3. Unable to add a record on a form
    By JamiB1979 in forum Forms
    Replies: 1
    Last Post: 06-22-2011, 08:36 PM
  4. Unable to create new record in Forms
    By escapades_access in forum Forms
    Replies: 5
    Last Post: 03-16-2011, 03:23 PM
  5. unable to add new record
    By itsmemike in forum Forms
    Replies: 2
    Last Post: 08-24-2010, 04:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums