View Full Version : Duplicate records


mariaw
10-24-2006, 03:57 AM
Hi

I have a table (which is populated by people filling in a form) which contains two fields:

Section
WeekCom (e.g. week commencing)

I want to make sure that the form will not allow someone to make a double entry. For example, if Sally goes in and says enters "Benefits" as the section and "WeekCom" as 15/10/06, and then Ben tries to do the same - the form will not allow Ben to enter it.

How do you do this please? The table does not have a primary key at the moment....is there any way of doing it without setting one of the fields as a primary key?

Thanks

Maria

Ron_dK
10-24-2006, 05:14 AM
Maria,
Why would you limit the entries in the table. Why can't Sally and Ben work on benefits both.
I would recommend to extend the table with a third field, e.g. section-specifics in which differentiated details relevant to a certain benefit can be entered.
Hope that makes sense.

mariaw
10-24-2006, 07:00 AM
Hi Rak

Sorry, I don't understand (probably my fault not yours :) - I want to make sure that Ben cannot go in an make an entry for the "Benefits" section for the week commencing "15/10/06" if Sally has already made this entry?

Maria

ejstefl
10-24-2006, 07:22 AM
You can set an index on both fields that will prevent duplicates.

Pat Hartman
10-24-2006, 08:22 PM
To create a multi-field primary key, select the first of up to 10 fields and then while holding the control key, select the others. When all parts are highlighted, press the key icon on the toolbar.

mariaw
10-25-2006, 04:43 AM
Hi Pat

That's great thanks - that has done the trick!

Maria