A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Index or primary key cannot contain a Null value



 
 
Thread Tools Display Modes
  #1  
Old January 6th, 2009, 07:01 AM posted to microsoft.public.access.tablesdbdesign
Desperate
external usenet poster
 
Posts: 39
Default Index or primary key cannot contain a Null value

Please help....Thank you
  #2  
Old January 6th, 2009, 11:36 AM posted to microsoft.public.access.tablesdbdesign
Stefan Hoffmann
external usenet poster
 
Posts: 991
Default Index or primary key cannot contain a Null value

hi,

Desperate wrote:
Please help....Thank you

You have left some fields of a recordset empty, thus it will be filled
with NULL (the non-value).
The field(s) forming the primary key must be filled with values.
If the fields are in an index you may modify the index to allow NULL.

You have to take a look at the involved table. The fields marked with
the key symbol are the primary key. Indices are modified in the Index
window.


mfG
-- stefan --
  #3  
Old January 6th, 2009, 06:38 PM posted to microsoft.public.access.tablesdbdesign
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Index or primary key cannot contain a Null value

On Mon, 5 Jan 2009 23:01:01 -0800, Desperate
wrote:

Please help....Thank you



You're trying to create a Primary Key on a table.
At least one record in the table has a NULL (empty, nothing defined) value in
the field which you wish to become the primary key.
A Primary Key cannot have any records with a NULL.

Correct the data in your table so that none of the records contain a NULL
value in the primary key field (or any of the fields, if you're using a
multifield primary key) and then create the index.
--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:49 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.