Duplicate records (1 Viewer)

mariaw

Registered User.
Local time
Today, 11:32
Joined
Jun 9, 2006
Messages
88
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

Cool bop aficionado
Local time
Today, 12:32
Joined
Sep 5, 2002
Messages
2,141
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

Registered User.
Local time
Today, 11:32
Joined
Jun 9, 2006
Messages
88
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

Registered User.
Local time
Today, 11:32
Joined
Jan 28, 2002
Messages
378
You can set an index on both fields that will prevent duplicates.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 06:32
Joined
Feb 19, 2002
Messages
43,396
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

Registered User.
Local time
Today, 11:32
Joined
Jun 9, 2006
Messages
88
Hi Pat

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

Maria
 

Users who are viewing this thread

Top Bottom