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
|
|||
|
|||
Index question
I am trying to use an index to allow only unique entries. If I use two
columns it works. When I try to add a third column it doesn't. Lets say I have Column 1 2 3 4 5 6 and I want columns 4,5 and 6 to control what is unique. For example: Column 1 2 3 4 5 6 1 a a a 2 a b a 3 a c a 4 a a 5 b a a 6 b a 7 a a b 8 a b These are all unique but, if I add a record.. Column 1 2 3 4 5 6 new b a it doesn't call it a duplicate and allows the entry. There are null fields in column 5 but, there will always be values in columns 4 and 6. Can this be done? What would make it not work if it can be done? Thank you, SKB |
#2
|
|||
|
|||
Index question
Due to the nature of Null, I don't believe that a field which can contain
Nulls can be used in unique indexes. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "SKB" wrote in message ... I am trying to use an index to allow only unique entries. If I use two columns it works. When I try to add a third column it doesn't. Lets say I have Column 1 2 3 4 5 6 and I want columns 4,5 and 6 to control what is unique. For example: Column 1 2 3 4 5 6 1 a a a 2 a b a 3 a c a 4 a a 5 b a a 6 b a 7 a a b 8 a b These are all unique but, if I add a record.. Column 1 2 3 4 5 6 new b a it doesn't call it a duplicate and allows the entry. There are null fields in column 5 but, there will always be values in columns 4 and 6. Can this be done? What would make it not work if it can be done? Thank you, SKB |
#3
|
|||
|
|||
Index question
I default the field to a dash - then the compound index can be set to unique.
"SKB" wrote: I am trying to use an index to allow only unique entries. If I use two columns it works. When I try to add a third column it doesn't. Lets say I have Column 1 2 3 4 5 6 and I want columns 4,5 and 6 to control what is unique. For example: Column 1 2 3 4 5 6 1 a a a 2 a b a 3 a c a 4 a a 5 b a a 6 b a 7 a a b 8 a b These are all unique but, if I add a record.. Column 1 2 3 4 5 6 new b a it doesn't call it a duplicate and allows the entry. There are null fields in column 5 but, there will always be values in columns 4 and 6. Can this be done? What would make it not work if it can be done? Thank you, SKB |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MVP Question (database Design & Server Requirements) | rayrock | Database Design | 3 | August 12th, 2005 02:45 AM |
Indexes on multiple fields -- redundant to reindex? | Bruce Rusk | Database Design | 5 | July 7th, 2005 07:37 AM |
MATCH within INDEX question | Ron H | General Discussion | 9 | June 13th, 2004 07:15 PM |
Match and index question | Troy | Worksheet Functions | 2 | June 3rd, 2004 01:31 PM |
Indexing - Global refresh/deletion of index marks | Ray Cleere | Formatting Long Documents | 2 | April 30th, 2004 04:31 PM |