Re: Prevent Duplicates
- From: John W. Vinson <jvinson@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 01 Aug 2009 13:49:50 -0600
On Sat, 1 Aug 2009 10:55:01 -0700, TomC <TomC@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Hello, I am using a form which consists of a parent and one or many
children. The sub-forms are tied together with a Primary Key. The child
record contains an Auto Number, the Parent Primary Key, and a Date (short
format) among other elements. Anyway, my problem is how do I prevent the
keying of multiple children records with the same date? Thanks for any help
you may provide. hvc
Open the child table in design view and create a new Index. Put some
distinctive name (DupDates say) in the left column of the index toolbox, and
the ParentPrimaryKey field in the right. On the next line down leave the left
column blank and put the datefield (which should NOT be named Date, that's a
reserved word!!) in the right column. Check the "Unique" checkbox.
Now you won't be able to create duplicates on the combination of the fields.
--
John W. Vinson [MVP]
.
- Follow-Ups:
- Re: Prevent Duplicates
- From: TomC
- Re: Prevent Duplicates
- References:
- Prevent Duplicates
- From: TomC
- Prevent Duplicates
- Prev by Date: Re: Prevent Duplicates
- Next by Date: Re: Continuous form length
- Previous by thread: Re: Prevent Duplicates
- Next by thread: Re: Prevent Duplicates
- Index(es):
Relevant Pages
|