My Assistant
![]() ![]() |
|
|
Feb 24 2012, 07:41 AM
Post
#1
|
|
|
UtterAccess Member Posts: 38 |
Hi, I hope someone can help!
I have a database that was working fine yesterday. I tired to enter in information into my form and today I am getting a pop up box that indicates I have a Index or primary key containing a null value. I have checked all of my tabels and relationships and I cannot seem to find this "null value" am I missing something? It seems I can enter in data into my table directly but not the form linked to that table.... I have looked and no relationship are broken... I am stumped. Thanks in advance. M (IMG:style_emoticons/default/iconfused.gif) This post has been edited by miedward: Feb 24 2012, 08:13 AM |
|
|
|
Feb 24 2012, 07:45 AM
Post
#2
|
|
|
Utter A-fishin'-ado Posts: 17,723 From: Cincinnati, Ohio, USA . . . ><((((°> |
You will not be able to find it in the tables because the message you're seeing is saying that it cannot save the record because of the null value.
You should be looking to where you are trying to save the record... What is causing the save attempt with the null value. |
|
|
|
Feb 24 2012, 07:58 AM
Post
#3
|
|
|
UtterAccess VIP Posts: 4,599 From: From Hawaii - Now in Wisconsin...Am I Nuts? |
Are you using a free text type field as your primary key where the user enters a value? If so, you should use an auto-id instead. This way the primary key is automatically entered once an entry is made in the record. If you're using that field because you do not want duplicates then you can just set it to not allow duplicates in the table by indexing it.
|
|
|
|
Feb 24 2012, 08:19 AM
Post
#4
|
|
|
UtterAccess Member Posts: 38 |
the primay key is set as an autonumber. I have tried entering in data directly into the database and it shows up in the form fine, however is just not saving from the form into the database.
|
|
|
|
Feb 24 2012, 08:50 AM
Post
#5
|
|
|
UtterAccess VIP Posts: 2,451 From: Downeast Maine |
I would try removing the record source from the form, saving the form, then adding the record source again.
What happens if you create an autoform based on the table? If there is a subform, are the linking properties set properly? Is there any code in the form? How about unique indexes in the table? |
|
|
|
Feb 24 2012, 08:54 AM
Post
#6
|
|
|
UtterAccess Member Posts: 38 |
Hey I Figured it out, all I had to do was go into my tables design view and delet the primary key row, insert a new row and selet it as autonumber and save and its working again!! DUH on my part... sometimes there is a simple answer. thanks for your help and your time. (IMG:style_emoticons/default/thanks.gif)
|
|
|
|
Feb 24 2012, 09:00 AM
Post
#7
|
|
|
UtterAccess VIP Posts: 4,599 From: From Hawaii - Now in Wisconsin...Am I Nuts? |
Glad you got it working. Good luck with your project.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 24th May 2013 - 12:02 AM |