Results 1 to 6 of 6
  1. #1
    Dave Lambert is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2018
    Posts
    26

    Error trying to write a record - MS Access 2016

    Hi all!

    I'm creating a database for my home inventories. It will contain furnishings, books, music, videos, etc.

    I'm having problems adding/writing a record into the Music table. I receive the following error:

    "You cannot add or change a record because a related record is required in table 'Music Genres'."


    I don't know why I'm receiving this message because the needed entries are already in the Music Genres table. That table is accessed from the Music form via a Combo Box. I select the Genre needed for the information for the recording. All relationships are set up.



    What did I do incorrectly? What other information do you need in order to help me solve this issue?

    Any help will be greatly appreciated!

    Thanks in advance!

    Dave

  2. #2
    davegri's Avatar
    davegri is online now Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    I'm having problems adding/writing a record into the Music table.
    Are you using a form to do this? If not, you need one.
    One of the controls on the form will be a combobox that will allow you to select the Genre.

    Post your DB here if you want someone to take a look.

  3. #3
    Dave Lambert is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2018
    Posts
    26
    Thanks for the quick reply!

    Yes, I'm using a form to enter data. The Genre is a ComboBox on the form.

    How do I post the database on the Forum?

  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,716

  5. #5
    John_G is offline VIP
    Windows 10 Access 2016
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    ...the needed entries are already in the Music Genres table. That table is accessed from the Music form via a Combo Box.
    I suspect there is an issue with the combo box. I expect it is showing you the text of the genre names, which are associated with a Genre_ID. So, several questions:

    1 - does the combo box include the Genre_ID as one of its fields (usually the first field, and hidden)?
    2 - what is the bound column of the combo box?
    3 - is the combo box bound to a field in the underlying table for the form? If so, what is that field - might it be Genre_ID?

    My guess is that the Genre_ID in the form's underlying table is getting an erroneous value (or none at all)

  6. #6
    Dave Lambert is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2018
    Posts
    26
    Thanks John!

    I'll check those things out.

    Dave

    Quote Originally Posted by John_G View Post
    I suspect there is an issue with the combo box. I expect it is showing you the text of the genre names, which are associated with a Genre_ID. So, several questions:

    1 - does the combo box include the Genre_ID as one of its fields (usually the first field, and hidden)?
    2 - what is the bound column of the combo box?
    3 - is the combo box bound to a field in the underlying table for the form? If so, what is that field - might it be Genre_ID?

    My guess is that the Genre_ID in the form's underlying table is getting an erroneous value (or none at all)

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

Similar Threads

  1. Replies: 8
    Last Post: 06-28-2018, 09:10 AM
  2. Replies: 5
    Last Post: 05-29-2018, 04:50 AM
  3. Error Messages On Subforms, Access 2016
    By roxdrob in forum Forms
    Replies: 19
    Last Post: 10-07-2017, 11:40 PM
  4. Replies: 10
    Last Post: 05-17-2017, 02:06 PM
  5. Write conflict error in access
    By Milad Roohi in forum Access
    Replies: 5
    Last Post: 05-27-2016, 08:30 PM

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