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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Setting a Date as Primary Key - Null message



 
 
Thread Tools Display Modes
  #1  
Old June 26th, 2008, 12:30 AM posted to microsoft.public.access.forms
1Adam12 via AccessMonster.com
external usenet poster
 
Posts: 4
Default Setting a Date as Primary Key - Null message

I'm building a third normalized form as a Daily input for my Subform line
items (second form, tied to the Main form housing the Companies who's line
items they are). I'm trying to set the Date in this table to be the Primary
key but it's saying I can't have a null value as a Primary key. I understand
what this means, and can't use todays date as an option. What's worse is on
one day the Date might be repeated multiple times (but only once for each
line item) which to my knowledge contradicts the whole "unique" element to a
Primary key. I haven't been able to get to see if my second question is even
a question, but either way, I'm as green as they come. Please help

Adam

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200806/1

  #2  
Old June 26th, 2008, 02:27 AM posted to microsoft.public.access.forms
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default Setting a Date as Primary Key - Null message

Hi Adam,

I have no idea what you're trying to in your application. If and when
you post again, please include a description of what you're trying to
achieve in real-world terms Also, please include the table structure
you're working with.

3rd Normal Form refers to the level of normalization of your data. It
does not refer to an object such as a Form.

For your immediate issue, create a new field in the table in question
and give it a datatype of Autonumber. Make that field the primary key
for this table. Access will generate unique long integers for
records.

The reason I recommend that newbies lurk

microsoft.public.access.gettingstarted and
microsoft.public.access.tablesdesign

is that other newbies who have just had breakthrough might be eager to
share their knowledge. Still others will lurk there to see if
anything applies to them. Your posts won't be ignored there. Lots of
MVPs and others surf through all of the Access newsgroups several
times a day.

If you believe that your question might apply to more than one
newsgroup then add the other newsgroups in the newsgroups line of your
reader. That way an answer in one group propagates to the other
groups. That's so much better than starting identical threads in
several groups. That way, no one can know that your issue has already
been resolved elsewhere. That wastes people's time.

Again, I recommend browsing www.mvps.org/access That site can be a
good friend to developers.

HTH
--
-Larry-
--

"1Adam12 via AccessMonster.com" u44422@uwe wrote in message
news:86395997be095@uwe...
I'm building a third normalized form as a Daily input for my Subform

line
items (second form, tied to the Main form housing the Companies

who's line
items they are). I'm trying to set the Date in this table to be the

Primary
key but it's saying I can't have a null value as a Primary key. I

understand
what this means, and can't use todays date as an option. What's

worse is on
one day the Date might be repeated multiple times (but only once for

each
line item) which to my knowledge contradicts the whole "unique"

element to a
Primary key. I haven't been able to get to see if my second question

is even
a question, but either way, I'm as green as they come. Please help

Adam

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200806/1



 




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 05:31 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.