Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Why table allowing duplicates?

Posted on 2015-02-13
8
Medium Priority
?
100 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 52

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 52

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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 52

Accepted Solution

by:
Gustav Brock earned 2000 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 52

Expert Comment

by:Gustav Brock
ID: 40608524
You are welcome!

/gustav
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

596 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