F
Flavelle Ballem
I am probably missing something, and it's easier to explain by example.
In Acess 2003:
1. Create a table with three fields (I've named it Table1):
Field: ID Autonumber, Primary Key
Field: Field1, text, Required = No, no index
Field: Field3, long integer, Required = Yes, no index
2. Create an index for the table (I've named it ux_Field1_Field2):
Includes Field1 and Field2
Primary = No
Unique = Yes
Ignore Nulls = No
3. Add the following entries to the table:
Entry 1: Field1 = 'Text Entry 1', Field2 = 1
Entry 2: Field1 is null, Field2 = 2
My objective in setting up the index in the way that I did was to ensure
that if I were to attempt to add another entry like either Entry 1 or Entry
2, the add would not succeed.
Actual result:
If I attempt to add a second entry with the identical contents to Entry
1, the add fails - duplicate index.
If I attempt to add a second, third, fourth ... entry with the identical
contents to Entry 2, the add succeeds every time. It should fail.
Could someone let me know if this is 'fixable'. I cannot change the
assignment of the Primary key, since it is important the Field 1 allow for
null values.
Thanks!
In Acess 2003:
1. Create a table with three fields (I've named it Table1):
Field: ID Autonumber, Primary Key
Field: Field1, text, Required = No, no index
Field: Field3, long integer, Required = Yes, no index
2. Create an index for the table (I've named it ux_Field1_Field2):
Includes Field1 and Field2
Primary = No
Unique = Yes
Ignore Nulls = No
3. Add the following entries to the table:
Entry 1: Field1 = 'Text Entry 1', Field2 = 1
Entry 2: Field1 is null, Field2 = 2
My objective in setting up the index in the way that I did was to ensure
that if I were to attempt to add another entry like either Entry 1 or Entry
2, the add would not succeed.
Actual result:
If I attempt to add a second entry with the identical contents to Entry
1, the add fails - duplicate index.
If I attempt to add a second, third, fourth ... entry with the identical
contents to Entry 2, the add succeeds every time. It should fail.
Could someone let me know if this is 'fixable'. I cannot change the
assignment of the Primary key, since it is important the Field 1 allow for
null values.
Thanks!