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
Solved

Why table allowing duplicates?

Posted on 2015-02-13
8
94 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
  • 4
  • 4
8 Comments
 
LVL 49

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 49

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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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 49

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 49

Expert Comment

by:Gustav Brock
ID: 40608524
You are welcome!

/gustav
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

861 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