Access Database, Record Duplication

Asked

Viewed 65 times

0

In a BD Access with fields ID (Automatic Numbering), EMPLOYEE, DATE, QUANTITY, the data is collected daily (in a single message) via Outlook. So, is it possible to prevent the same employee from having two BD records with the same date? Please, if possible, I need to learn, help me. It is necessary to prevent the employee from sending the same message twice or more. For example.: inserir a descrição da imagem aqui

  • The official field is foreign key (FK)?

  • It is not a foreign key, but it is important to say that in this field there is a relation with another table in which it is also not a Key but is indexed with unauthorized duplication. Thank you!

1 answer

0

Use the code below:

ALTER TABLE [sua_tabela] ADD CONSTRAINT uniq_registro UNIQUE ([FUNCIONÁRIO], [DATA])

  • Excuse me @fba_pereira where can I put this code? in the "Validation rule" or where? Forgive my naiveté is that only a novice in this matter. Thank you!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.