No Indexing, No Dups

chansda

New member
Local time
Yesterday, 22:39
Joined
Mar 17, 2008
Messages
6
In my table, I have a number field set to Index (dups OK). I have another field that I do not want to index but need "no dups." Any ideas?
 
i think you will havevto index to get no dups, but no reason why you shouldnt index it
 
In my table, I have a number field set to Index (dups OK). I have another field that I do not want to index but need "no dups." Any ideas?
If you have to utilize "uniqueness" in a field that is not indexed, you'll have to manually prevent the entry of records that will cause the duplication, such as a reroute block in your code. Maybe some code in a data entry form. Say, like this:
Code:
if DCount(value in the field) > 0
  msgbox "You cannot duplicate values in this field"
    exit sub

etc...
 
but to do what adam says, you have to write code, and the dbs manager will do that for you by preventing the duplicate anyway, with no effort on your part, if you index the field -although out of interest the index will NOT detect multiple NULL values,
 

Users who are viewing this thread

Back
Top Bottom