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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|