Results 1 to 2 of 2
  1. #1
    MushingJeep is offline Novice
    Windows 8 Access 2013
    Join Date
    Jan 2014
    Location
    Detroit, MI
    Posts
    1

    Unable to add additional records

    Hello,



    I'm not a programmer, and am learning and figuring out Access and advanced features as I go and could really use an issue with a bug I've found in my database I'm building.

    The database is used to track products which are used for reviews by various media, and I have three main tables and forms - Reviews, Reviewers and Assets. I'm utilizing a DLookup code to auto fill certain properties from the Reviewers and Assets tables when I'm creating a new review entry.

    Code:
     Option Compare Database
    Private Sub Item_AfterUpdate()
    
        Me.Model = DLookup("Model", "Assets", "Item = '" & [Item] & "'")
        
        Me.Product_Status = DLookup("[Product Status]", "Assets", "Item = '" & [Item] & "'")
    
    End Sub
    
    Private Sub Outlet_AfterUpdate()
    
        Me.First_Name = DLookup("FirstName", "Reviewers", "Outlet = '" & [Outlet] & "'")
        
        Me.Last_Name = DLookup("[Last Name]", "Reviewers", "Outlet = '" & [Outlet] & "'")
        
    End Sub
    The issue I'm having, is after inputting a few reviewers and reviews, I get an error message when trying to save a new review which states: "You cannot add or change a record because a related record is required in table 'Reviewers'." (I've attached a screenshot)

    Click image for larger version. 

Name:	AccessError.JPG 
Views:	10 
Size:	69.4 KB 
ID:	15077

    I've cancelled out of the new review form to see if the reporter is showing up in the 'Reviewers' table, and they are. So I'm not sure why I'm being told there isn't a related record in that table.

    Any information, guidance or assistance you can provide would be extremely appreciated.

    Thank you,
    Chris

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Specific to the error msg. you have a relationship defined in the Relationships window that has referential integrity enforced. A child record needs to be added in order to satisfy the referential integrity rule you created.

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

Similar Threads

  1. Unable to sort records in database
    By SiyarK in forum Access
    Replies: 6
    Last Post: 02-07-2013, 02:22 PM
  2. Append additional records
    By BFlat in forum Queries
    Replies: 2
    Last Post: 04-20-2012, 02:28 PM
  3. additional detail records to be inserted
    By Mclaren in forum Reports
    Replies: 1
    Last Post: 03-16-2011, 02:10 AM
  4. Replies: 1
    Last Post: 11-17-2010, 10:38 AM
  5. Replies: 2
    Last Post: 11-05-2010, 04:47 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