user2817017
user2817017

Reputation: 139

Restrictic data entry to prevent duplicates in ms-access

I'm building a database for my company in ms-access and now have a "Clients" table and a "Projects" table. I have set the clients table to only accept unique values and I would like to restrict the projects in the same way, but different projects CAN have the same name, just not if there are with the same client. I have already set up relationship between my tables, is there a way to restrict projet entries to be unique "only if projet client is the same"?

Upvotes: 0

Views: 62

Answers (1)

Lord Peter
Lord Peter

Reputation: 3501

Add the ClientID column to your Projects table. Create a unique index on the Projects table with both the ClientID and Project Name in it.

Upvotes: 1

Related Questions