A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Prevent Duplicates



 
 
Thread Tools Display Modes
  #1  
Old March 27th, 2010, 03:41 PM posted to microsoft.public.access.gettingstarted
Summing multiple fields on a form
external usenet poster
 
Posts: 38
Default Prevent Duplicates

I have a fieldname (SignInDte). If I have a 7/01/2009 date in my table, how
do I prevent user from entering another 7/01/2009 date?
  #2  
Old March 27th, 2010, 03:49 PM posted to microsoft.public.access.gettingstarted
John Spencer
external usenet poster
 
Posts: 7,815
Default Prevent Duplicates

Easiest way to totally prevent it is to set an no duplicates index on the
SignInDte field.

Of course, if you want to do this BY USER you will need to make a multi-field
unique index based on the userid and SignInDte field.


To create a multiple field unique index (Compound index)
--Open up the table in design mode
--Select View: Index from the menu
--Enter a name for the iIndex in first row under Index Name
--Select one field in the index under Field Name
--Set Unique to Yes
--Move down one line and select the next FieldName
(Do NOT skip rows, do NOT enter the index name again)
--Continue moving down and selecting fieldnames until all needed fields are
included.
--Close the index window and close and save the table

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Summing multiple fields on a form wrote:
I have a fieldname (SignInDte). If I have a 7/01/2009 date in my table, how
do I prevent user from entering another 7/01/2009 date?

  #3  
Old March 27th, 2010, 05:15 PM posted to microsoft.public.access.gettingstarted
Summing multiple fields on a form
external usenet poster
 
Posts: 38
Default Prevent Duplicates

Thx John, Please bare with me..... I looked on the structure for a no
duplicate index before asking the question, so Im obviously looking in the
wrong place. Where do I find it?

"John Spencer" wrote:

Easiest way to totally prevent it is to set an no duplicates index on the
SignInDte field.

Of course, if you want to do this BY USER you will need to make a multi-field
unique index based on the userid and SignInDte field.


To create a multiple field unique index (Compound index)
--Open up the table in design mode
--Select View: Index from the menu
--Enter a name for the iIndex in first row under Index Name
--Select one field in the index under Field Name
--Set Unique to Yes
--Move down one line and select the next FieldName
(Do NOT skip rows, do NOT enter the index name again)
--Continue moving down and selecting fieldnames until all needed fields are
included.
--Close the index window and close and save the table

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Summing multiple fields on a form wrote:
I have a fieldname (SignInDte). If I have a 7/01/2009 date in my table, how
do I prevent user from entering another 7/01/2009 date?

.

  #4  
Old March 27th, 2010, 05:58 PM posted to microsoft.public.access.gettingstarted
Summing multiple fields on a form
external usenet poster
 
Posts: 38
Default Prevent Duplicates

Nevermind John....I found it. Again thx for your help

"Summing multiple fields on a form" wrote:

I have a fieldname (SignInDte). If I have a 7/01/2009 date in my table, how
do I prevent user from entering another 7/01/2009 date?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.