Create new secondary constraint on a table using the Access UI (1 Viewer)

GoodyGoody

Registered User.
Local time
Today, 11:35
Joined
Aug 31, 2019
Messages
120
Hi, I was to create a secondary constraint on a table as a combination of 2 fields. How do I do this using the Access UI as opposed to doing it in SQL?

Thanks
Stephen
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:35
Joined
May 21, 2018
Messages
8,525
This requires the first name and last to be unique combination. Click on idexes. Give the index a name. Add the fields.
Index.jpg
 

GoodyGoody

Registered User.
Local time
Today, 11:35
Joined
Aug 31, 2019
Messages
120
Ah thank you! I new it had to be somewhere. Did an Alter table in the end :)
 

isladogs

MVP / VIP
Local time
Today, 11:35
Joined
Jan 14, 2017
Messages
18,209
As already advised, creating a composite index on first and last name will prevent you having more than one person with the same names.
In my experience, you may regret doing that.
 

GoodyGoody

Registered User.
Local time
Today, 11:35
Joined
Aug 31, 2019
Messages
120
No this is to keep the runnerracenumber unique for a race which of course is what you want. Only one number per race. :)
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:35
Joined
May 21, 2018
Messages
8,525
creating a composite index on first and last name will prevent you having more than one person with the same names.
That was only an Generic example of how to create a composite index. I do not even know if those are fields in the table.
 

GoodyGoody

Registered User.
Local time
Today, 11:35
Joined
Aug 31, 2019
Messages
120
It's fine. I know what I need. Thanks for the input
 

Users who are viewing this thread

Top Bottom