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  

Index question



 
 
Thread Tools Display Modes
  #1  
Old February 23rd, 2006, 05:52 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 23rd, 2006, 06:03 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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  
Old February 23rd, 2006, 08:32 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default 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

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

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


All times are GMT +1. The time now is 05:37 PM.


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