Solved

Why table allowing duplicates?

Posted on 2015-02-13
8
98 Views
Last Modified: 2015-02-13
I have a table with two fields..  ID (PK) and RecordDate which is Short Date format.

I have the RecordDate Index property set as Yes (No Duplicates) and yet I can enter more than one record with today's date.

Why is it letting me do this?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 40607939
If you use Now for today's date it will happen. Do you use Date for setting the date?

/gustav
0
 

Author Comment

by:SteveL13
ID: 40607947
The field is ShortDate.  If I just enter a new record and type 02/13/2015 in the field it will accept it even though there is already a record with that date in it.
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 40608236
And if you enter that date a second time?

Are you the index is on this field alone and not both ID and RecordDate?

/gustav
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:SteveL13
ID: 40608425
I just changed the table so the RecordDate is the PK.  no dupes.  But it STILL lets me enter 02/13/2015 even through another record has that date.

I don't get it.
0
 

Author Comment

by:SteveL13
ID: 40608444
I just attached a sample db.  I cannot get the table to stop accepting duplicate values in the RecordDate field.
Table-Example.accdb
0
 
LVL 50

Accepted Solution

by:
Gustav Brock earned 500 total points
ID: 40608464
If you change the format to Standard you'll se the times:DupeDates.PNGYou have to ensure clean dates are entered.

/gustav
0
 

Author Closing Comment

by:SteveL13
ID: 40608499
Who would have thought?  Thanks as always!
0
 
LVL 50

Expert Comment

by:Gustav Brock
ID: 40608524
You are welcome!

/gustav
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question