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)
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