avoid repetitive values in several fields

xxyy

Registered User.
Local time
Tomorrow, 00:07
Joined
Feb 24, 2006
Messages
51
I have a table similar to this

table
-----
ID
field1
field2
field3

'ID' is the primary key but I want MS-Access to have an eye on field1-3 to avoid entering the same information into field1-3.

How can I do this?

(Using field1-field3 as primary keys is not desirable)

Please help.

Thanks in advance.

xxyy
 
The fields do not have to be primary keys. In the table design you will find property called Indexed. Change it to 'Yes(No Duplicates)' Having said that, it would be better if the values were checked in a form. You could still perform data validation there.
 
Dear TanisAgain,

Thanks for your reply.

The problem is that a field (e.g.field1) can contain the same data many times but field1+field2+field3 together aren't allowed to contain the same data.

allowed:
field1 field2 field3
x y z
x y zw

not allowed:
field1 field2 field3
x y z
x y z

BR

xxyy
 
Yes, that's what a multi field index will do. The individual fields can have duplications but the combination of the three must be unique.
 
Thanks, that's what I wanted to use.

Only a little problem:

I have a field that doesn't contain any value and I couldn't set the m-index to work properly (zero length didn't help).

BR

xxyy
 

Users who are viewing this thread

Back
Top Bottom