Duplication checks in record table

Lifeseeker

Registered User.
Local time
Today, 13:53
Joined
Mar 18, 2011
Messages
273
Hi,

I have a record junction table set up and I populate this junction table by having two other tables to feed into it.

My question is.....is there any way to put a duplication check in a column within this record table?

Users do not want to add the same facility twice into the record. Can this be done in VBA coding?

Thank you for any comment and thoughts.
 
In the junction table, make a unique compound key from the id of each of the tables that feed the junction table,

eg, Junction Table
ID PK
TblOne_Id
TblTwo_Id

Unique Index on TbleOneId + TblTwoId

This will prevent duplicates in the junction table. Access will highlight a message (I think 3022 but that's a guess)
 
In the junction table, make a unique compound key from the id of each of the tables that feed the junction table,

eg, Junction Table
ID PK
TblOne_Id
TblTwo_Id

Unique Index on TbleOneId + TblTwoId

This will prevent duplicates in the junction table. Access will highlight a message (I think 3022 but that's a guess)

Hi, thanks for the reply.

So on my record table, I actually only have two columns. The values in the 1st column are PK from table A, and the values in the 2nd column are PK from table B.

If I want to have a duplication check against only the 1st column(it's okay to have repeating values in the 2nd column), does the solution above still work?

Even tho I"m using a junction record table, but the relationship between two tables( A and B) is one-to-many. So It's okay to have repeating values in the 2nd column, but I would like to have a duplication check against the first column.

Is this still possible?

Appreciate any input on this.
 

Users who are viewing this thread

Back
Top Bottom