Preventing duplication of records

P

Paulc716

Hi all,

I am building a database which will hold the work records of a number of
employees. At the end of each month I require to enter a break down of
their working hours for the month. These records will be used to produce
statistical data.

I've created a Personnel Table which holds employee no., name, DOB, address
etc. I've also created a related table to hold the hours, with each record
held against the employee's name/number, month and year. I am using a list
box, linked to the Personnel Table, to enter the names. I also enter the
month and year (separately) in similar manners.

However, I can't prevent someone accidentally re-entering (duplicating) an
individuals monthly hours. The problem is individually the employees
name/number and the month/year will appear in many different records in the
table. But together they need to be unique.

Has anyone got any ideas?

PAUL
 
J

Juan Paulo

In the Design view of the table select both
fields at once, and select the two as KEY
and say to each field "Indexed=Yes with Duplicates" and
"Required=Yes"
This said to Access to handle the key as one key,
and test it trying to insert one duplicated.

Saludos
Juan Paulo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top