F
Fred Boer
Hello:
I have a table for library patrons. I want to prevent duplicate entries. I
have three fields: PatronFirstName, PatronMiddleName, PatronLastName. In the
past, I've used a DCount with the First and Last names. I've been doing some
revisions. I'd like to be able to include the Middle name. I was having
trouble writing a DCount expression that worked. I thought *bingo*! Why not
just create an index on the three fields, set it to "No Duplicates". But I
can't seem to make that work either.
If all three fields have the same values, the index prevents the record from
saving and throws an error. If the middle name is Null, the index does not
prevent the addition of the duplicate record. Is there a way to use a
compound index to do this?
Thanks!
Fred
P.S. And I thought I was *so* clever to think of the unique compound index
rather than my convoluted code..
I have a table for library patrons. I want to prevent duplicate entries. I
have three fields: PatronFirstName, PatronMiddleName, PatronLastName. In the
past, I've used a DCount with the First and Last names. I've been doing some
revisions. I'd like to be able to include the Middle name. I was having
trouble writing a DCount expression that worked. I thought *bingo*! Why not
just create an index on the three fields, set it to "No Duplicates". But I
can't seem to make that work either.
If all three fields have the same values, the index prevents the record from
saving and throws an error. If the middle name is Null, the index does not
prevent the addition of the duplicate record. Is there a way to use a
compound index to do this?
Thanks!
Fred
P.S. And I thought I was *so* clever to think of the unique compound index
rather than my convoluted code..