Index or primary key cannot contain a Null value!!!!!!

  • Thread starter Thread starter Lushman
  • Start date Start date
L

Lushman

Guest
I have a form that uses a total of six tables. Mainly one big one, and also using five smaller ones in a "many to one" relationship. I have two buttons, one duplicates a record and one saves it. I can use the duplicate record button, but when I go to save it, i get the error "Index or primary key cannot contain a Null value." And two dropdown menus would not let me select any options: "Funder Name" and "Sourcing Dealer". I am dangerously out of my depth and rapidly sinking. Any help is welcome.
:)
 
Access prevents duplicates or null values from being entered into primary key fields. Have a look at Access help for a more detailed description on this topic.

What do you have as the record source for the combo box? Are you looking the values up in a table/Query or are you using a value list?

Hay
 
Table/Query. I expect If I use a user value list it will work. We can't have that information in a value list because that table hold more information which is required to be shown on the form.
 
Go into the properties of your combo box and ensure that the row type is set to table/query. Go into the row source and choose the button with the 3 dots to the side of that, now select the columns you want to look up - You will probably want to hide the primary key.
 
Set the column count to however many columns you want to see, the bound column will be 1. Set the width of the bound column to 0.
 
Ok then, at least if you change your mind you'll know what to do. Are you sorted now then?
 

Users who are viewing this thread

Back
Top Bottom