title: Access error You cannot add or change a record because a related record is required in table 'User'
body: <p>I'm working with access and I want to upload a photo for an existing user. I get this error "You cannot add or change a record because a related record is required in table 'User'". I saw here on the site that the problem was entering the wrong value in the foreign key but it isn't the case here.
  The Tables:
  <a href="https://i.stack.imgur.com/QReZ4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QReZ4.png" alt="enter image description here"></a> </p>
  
  <p>The photo variable isn't connected to the table Photo because I need the id of the photo, so I must insert it before. then i get
  the id of the photo from the username and saving the photo as the id+type - like 3.jpg - and then updating the user table.
  But Even before all of this I still cant insert a single photo.</p>