Setting a Date as Primary Key - Null message

  • Thread starter 1Adam12 via AccessMonster.com
  • Start date
1

1Adam12 via AccessMonster.com

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
 
L

Larry Daugherty

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top