Solved

Why table allowing duplicates?

Posted on 2015-02-13
8
96 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
Independent Software Vendors: 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

697 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